← All posts
Why Just Game Engine uses an explicit ECS and a fixed timestep
The two architectural decisions that shape everything else in Just Game Engine, and what they buy you on mobile.
engine architecture
Most Flutter game frameworks are component trees with an update callback. Just Game Engine takes a different route: entities are ids, components are plain data, and systems are the only things that run logic.
Explicit ECS
- Predictable ordering. Systems run in a declared order every tick, so physics never observes a half-updated transform.
- Cheap iteration. Components live in dense arrays; a system that touches
TransformandVelocitywalks two arrays, not a widget tree. - Serialisable state. Because components are data, snapshots and replays are a copy, not a reconstruction.
Fixed timestep
The simulation advances in fixed 16.6 ms steps regardless of the display refresh rate. Rendering interpolates between the last two states.
engine.step = const Duration(microseconds: 16667);
engine.onRender = (alpha) => renderer.draw(world, alpha);
On phones this matters more than on desktop: thermal throttling changes the frame rate mid-session, and a fixed step keeps gameplay deterministic while the renderer absorbs the jitter.
Read the full docs at engine.justunknown.com.