2D Game Engine
A from-scratch C++ engine that resolves 100,000+ entities.
Modern C++ on SDL2 and Box2D, with collision on a spatial hash so 100,000+ entities stay tractable instead of quadratic. An embedded Lua API and JSON scene config let content scale without recompiling.
Collision at scale
Collision detection runs on a spatial hash rather than a pairwise sweep. Every entity is bucketed by the cell it occupies and only ever tested against the handful of entities sharing its neighbourhood, which is what keeps interactions between 100,000+ entities tractable instead of quadratic.
Box2D handles the resolution once a candidate pair is found; the spatial hash exists to make sure it is only ever asked about pairs that could plausibly touch.
Scripting and configuration
An embedded Lua environment exposes a scripting API for component management, so behaviour can be written and iterated without rebuilding the engine.
RapidJSON handles engine configuration on the same principle: scenes are data, not code, and adding one costs a file rather than a compile.
- 100,000+ entities resolving collisions without going quadratic.
- Lua scripting API for component management, embedded in the engine.
- JSON-driven configuration, so scenes scale without a recompile.