Building an ECS in TypeScript

  1. What is an ECS?
  2. Why build an ECS? Why TypeScript?
  3. A TypesScript ECS in 99 Lines of Code
  4. Tests
  5. Deeper Dive: Entities
  6. Deeper Dive: Components
  7. Dirty Component Optimization
  8. Aspects
  9. Deeper Dive: Systems
Nov 25, 2021

Building an ECS in TypeScript

What is an ECS?

Preface

This series is intended to be a simple walkthrough of building an ECS-based game engine in TypeScript. It’s based off my work on Fallgate, a small 2D action-adventure game I built with my friend Cooper over about two years of evenings and weekends.

So, what is an ECS?

ECS stands for entity component system. It is a design pattern used when programming games.

It works this way: you have Entities, Components, and Systems. (I’ll capitalize these throughout.)

ECS Visualization

This ECS visualization demonstrates the core concept of Systems: selecting Entities that Contain at least their required Components. Under-the-hood, the visualization is powered by the ECS that we’ll build in this series.

Controls:

post info


Published Nov 25, 2021
Updated Jul 28, 2023
Outbound

Building an ECS in TypeScript series