
AgentRuss Project
Three.js ECS Game Engine
A 3D game engine built from scratch with JavaScript, Three.js and a custom Entity Component System architecture, developed alongside a long-form tutorial series.
Building a 3D Game Engine From Scratch
This project is a custom 3D game engine built with JavaScript, Three.js, and an Entity Component System (ECS) architecture.
Rather than relying on a full game engine such as Unity or Unreal Engine, the goal is to understand and build the underlying systems ourselves.
The project is being developed alongside my long-form YouTube tutorial series, where each system is implemented step by step.
What the Engine Includes
The engine has grown to include systems for:
- Player movement and input
- Third-person camera controls
- Collision detection
- Interaction
- Inventory and equipment
- Character stats
- Targeting
- Combat and damage
- Health bars and damage numbers
- Death and respawning
- Loot drops
- Quickbar items
- Abilities and cooldowns
- Status effects
ECS Architecture
The engine is built around a custom Entity Component System.
The core principle is:
Entities are IDs. Components are data. Systems are logic.
For example, an entity can be created and given components:
1const player = world.createEntity()2
3world.addComponent(player, new Transform(0, 1, 0))4world.addComponent(player, new Velocity())5world.addComponent(player, new Health(100, 100))6world.addComponent(player, new PlayerControlled())Systems then operate on entities that contain the components they require.
This keeps gameplay features separated by responsibility and allows entities to gain behaviour through composition rather than large inheritance trees.
Why I'm Building It
The goal isn't simply to recreate features that already exist in commercial engines.
Building these systems manually provides a much deeper understanding of:
- game architecture
- engine design
- gameplay systems
- rendering
- physics and collision
- reusable software architecture
It also allows the architecture to evolve around the needs of the game rather than being hidden behind a commercial engine.
Tutorial Series
The engine is being built alongside my Three.js ECS Game Engine YouTube tutorial series.
The series takes a no-skipped-steps approach, building features incrementally while explaining why each architectural decision is made.
As the project has grown, the engine has evolved from basic ECS fundamentals into a much larger gameplay framework.
Development Status
The engine is actively in development.
New systems and features continue to be added as the tutorial series progresses and the architecture evolves.
The long-term goal is to create a reusable foundation capable of supporting RPG and simulation-style games.