Skip to content

ECS Architecture

Estella is built on an Entity-Component-System (ECS) architecture. Instead of deep class hierarchies, game state is plain data in components, and behavior lives in systems that run over that data.

  • Entity — an identifier. It owns no data and no behavior; it is just a handle that components attach to.
  • Component — a small, plain data struct (position, velocity, sprite). An entity is defined by which components it has.
  • System — a function that runs each frame over every entity matching a query, reading and writing components.

Components are stored in cache-friendly pools — one densely packed sparse set per component type — so a system iterating “all entities with a Transform and a Speed” walks contiguous memory. Storage lives in the C++/WebAssembly core, and the SDK reads it with zero copies through a generated, hash-checked memory layout — so the TypeScript and C++ views of a component can never silently drift apart.

You compose a game from three SDK primitives:

import { App } from 'esengine';
const app = App.new();
// register components, systems, and plugins on the app…
app.run();