ImagoEngine

A free, open source, 2D Game Engine built in C++, designed around a strict ECS architecture

Get Started

ECS

Entities

An entity is a bare uint32_t, not an object.

Components

Components are plain structs with no logic.

Systems

All behavior lives in free functions that run over components.

The Shift to DOD

Data Oriented Design

DOD means organizing your program around its data and how that data is processed, laid out the way the hardware reads it the fastest. ImagoEngine applies DOD through ECS: your code is built around data stored in components, grouped under IDs called entities, with systems running logic over them. For example, a player is no longer a class; it is an ID with components bound to it that are updated by separate systems relevant to the player's logic.

Cache Optimization

A CPU waitng on main memory is not doing work, so keeping data in the cache is key to game optimization. ImagoEngine packs each component type into its own array and systems walk straight through only the components they need, meaning every chunk the CPU loads is full of data the system is about to use, greatly reducing cache misses. Object-oriented designs scatter objects across memory and each one has fields not used by the current task, causing far more cache misses every time a game object is accessed.

Simpler Design

Inheritance-based game objects need careful upfront planning, or they grow into fragile hierarchies where one change breaks unrelated code. In game development, where mechanics are prototyped, playtested, and reworked constantly, that planning rarely holds up. ECS avoids this problem by design: data lives in components, logic lives in separate systems, and systems communicate through events, so new ideas become new pieces instead of rewrites or refactors, and code stays easy to extend and debug.

Status

There is no renderer yet, so the game window is currently empty.