AR
AgentRuss

YouTube

Videos

Programming, game development, Three.js, ECS architecture, gaming and long-form technical tutorials from AgentRuss.

Latest Upload

Latest from AgentRuss

27 Sept 2026

Build an Encounter & Wave System in ECS | Spawn Enemies in Waves | Ep 43

Discord: https://discord.gg/Zvkk8Gr Twitch: https://www.twitch.tv/agentruss Website: https://agentruss.tv/ 📺 Watch the full playlist here: https://www.youtube.com/playlist?list=PLf1-5JViTP7AHmUNeUWft4bdSmLNj4q40 In Episode 43 of this ECS game engine series, we build the first version of a real encounter and enemy wave system. Instead of manually placing every enemy in the level, encounters now wait for the player to enter a trigger area, spawn enemies in waves, track when each wave has been defeated, and automatically advance to the next one. In this episode, we: - Create an Encounter component to track runtime encounter state - Add EncounterMember to associate spawned enemies with their encounter - Add DespawnOnDeath so wave enemies disappear instead of respawning forever - Create a data-driven EncounterDatabase - Define multiple enemy waves using our existing enemy variants - Build an EncounterFactory for spawning encounter entities - Update the EnemyFactory to support both normal respawning enemies and encounter enemies - Create DespawnOnDeathSystem for encounter cleanup - Build the main EncounterSystem for trigger detection, wave spawning, wave completion, and progression - Add an Encounter UI showing the current wave and enemies remaining - Replace manually placed enemies in the test level with a real encounter The important part is that the encounter system does not need special logic for every enemy type. It simply reads the encounter data and uses the existing EnemyFactory, AI, damage, death, loot, status effect, targeting, and UI systems. By the end of the episode, walking into the encounter area starts Wave 1, defeating that wave advances to Wave 2, and the encounter continues until all three waves are cleared. This gives us the foundation for things like combat rooms, enemy camps, arenas, dungeons, quests, and wave-based encounters. In the next episode, we can build on this with encounter rewards, so completing all waves can grant coins, items, experience, or unlock something in the level. If this series is helping you understand ECS and game engine architecture, consider subscribing and following along as we keep building the engine from scratch. #ECS #GameDev #JavaScript #ThreeJS #GameEngine

Watch on YouTube

Tutorial Series

Three.js ECS Game Engine

Follow the complete game-engine series from ECS fundamentals through increasingly advanced gameplay systems.

View playlist on YouTube
43 episodes
Episode 119 Jan 2026

Building a 3D Game Engine from Scratch in JavaScript (ECS + Three.js) | Episode 1

Episode 220 Jan 2026

Building the ECS World — 3D Game Engine from Scratch (JavaScript + Three.js) | Episode 2

Episode 323 Jan 2026

Systems & Delta Time - Make ECS Move! (3D Game Engine from Scratch) | Episode 3

Episode 42 Feb 2026

Render System - Turning ECS Data into Visuals (3D Game Engine from Scratch) | Episode 4

Episode 53 Feb 2026

Engine-Style Input Pipeline - Player Controller + Jump Buffer (JavaScript + Three.js) | Episode 5

Episode 66 Feb 2026

ECS Camera Follow + Correct System Order (Smooth Movement) - 3D Engine from Scratch | Ep. 6

Episode 79 Feb 2026

Real Collisions & Walls (AABB Physics) - Building the Game World | 3D Engine from Scratch | Ep. 7

Episode 810 Feb 2026

ECS Lighting + Shadows (No Hardcoding) — 3D Engine from Scratch | Ep. 8

Episode 912 Feb 2026

Capsule Collider Character Controller (ECS) + Control Modes (Face Move vs Strafe) | Ep 9

Episode 1013 Feb 2026

Third-Person Orbit Camera + Mouse Look (ECS) — 3D Engine From Scratch | Episode 10

Episode 1115 Feb 2026

ECS Aim System + Camera Data Pipeline (Strafe Mode Fixed) — 3D Engine From Scratch | Ep. 11

Episode 1216 Feb 2026

Character Controller Polish — Step Offset, Slopes & Wall Sliding | 3D Engine From Scratch | Ep. 12

Episode 1322 Feb 2026

Building a REAL Test Level (Stairs, Slopes & Corners) — 3D Engine From Scratch | Ep 13

Episode 1424 Feb 2026

Fix Third Person Camera Clipping (ECS Camera Collision System) | 3D Engine From Scratch | Ep 14

Episode 1526 Feb 2026

Over-the-Shoulder Camera + Polish | 3D Game Engine from Scratch (ECS) – Ep 15

Episode 1627 Feb 2026

Event Bus in ECS (Publish/Subscribe + Double Buffering) | 3D Engine From Scratch — Episode 16

Episode 1728 Feb 2026

Event-Driven Damage + Fixed Timestep (60Hz Simulation) | 3D Engine From Scratch — Episode 17

Episode 181 Mar 2026

Event-Driven Death & Respawn System (ECS + Event Bus) | Ep 18

Episode 195 Mar 2026

Add Checkpoints + Health Bar UI (Event-Driven ECS) | Ep 19

Episode 206 Mar 2026

Build a Reusable Interaction System in ECS (Press E to Interact) | Ep 20

Episode 219 Mar 2026

Build a Pickup & Inventory System in ECS (Press E to Pick Up) | Ep 21

Episode 2210 Mar 2026

Build an Item Definition Database for Inventory Systems (ECS) | Ep 22

Episode 2311 Mar 2026

Use Health Potions with an Event-Driven RPG System (ECS) | Ep 23

Episode 2412 Mar 2026

QuickBar UI for a 3D RPG Inventory System (ECS) | Ep 24

Episode 2513 Mar 2026

Build an Inventory Panel UI with Mouse Selection (ECS) | Ep 25

Episode 2615 Mar 2026

Add Use & Equip Buttons to the Inventory UI (ECS) | Ep 26

Episode 2716 Mar 2026

Equipment System + Equipped Weapon UI in ECS | Ep 27

Episode 2820 Mar 2026

Build a Real RPG Stat System in ECS | Equipment Modifiers & Final Stats | Ep 28

Episode 2922 Mar 2026

Make Stats Affect Combat in ECS | Attack, Defense & Damage Formula | Ep 29

Episode 3023 Mar 2026

Armor Now Reduces Damage! Add Body Slot Gear in ECS | Ep 30

Episode 3124 Mar 2026

Fix Health Bar UI in ECS | Player HUD + Target Health Bar | Ep 31

Episode 3225 Mar 2026

Add Floating Enemy Health Bars in ECS | World Space UI | Ep 32

Episode 3330 Mar 2026

Improve Target Selection in ECS | Sticky Camera-Aware Targeting | Ep 33

Episode 341 Apr 2026

Add a Target Ring in ECS | Selected Enemy Indicator | Ep 34

Episode 353 Apr 2026

Add Hit Flash & Damage Numbers in ECS | Combat Feedback Upgrade | Ep 35

Episode 365 Apr 2026

Build Your First Enemy AI in ECS | Idle, Chase & Attack System | Ep 36

Episode 378 Apr 2026

Build Enemy Death & Respawn in ECS | Corpse Linger + Clean Respawn | Ep 37

Episode 3817 Apr 2026

Add Enemy Loot Drops in ECS | Real RPG Reward Loop | Ep 38

Episode 392 July 2026

Add Item Rarity & Gear Quality in ECS | RPG Loot Upgrade | Ep 39

Episode 407 July 2026

Build an Ability System in ECS | Action Bar + Cooldowns | Ep 40

Episode 4121 Aug 2026

Build a Status Effect System in ECS | Poison, Regen & Damage Over Time | Ep 41

Episode 4225 Aug 2026

Build Data-Driven Enemy Variants in ECS | Grunt, Swift, Tank & Venom | Ep 42

Episode 4327 Sept 2026

Build an Encounter & Wave System in ECS | Spawn Enemies in Waves | Ep 43

Recent Uploads

More Videos

View YouTube channel