Fifty Barrels, One Draw Call
The ServiceLocator, an entity handler registry, GPU instancing, and quality auto-detection that took mobile from 20fps to 50.
The Release That Made It a Platform
- `ServiceLocator` with a declared dependency graph, initialisation order and
reverse disposal.
- `EntityHandlerRegistry`, plus game-specific handlers in
src/game/, giving
MapRenderer pre/post render hooks and a real engine/game boundary.
- `InstancedMeshManager`: automatic GPU instancing for repeated
misc_model
entities, three or more.
- `QualityDetector`: GPU tier, memory, CPU cores, platform, into five presets
— ultra, high, medium, low, potato.
- `TextureMemoryManager` with LOD, quality-based budgets and
getStats(). - An event-driven architecture in the
EventBus.
The Numbers That Matter
50 identical trees: 50 draw calls -> 1
100 barrels: 100 draw calls -> 1
100 trees: 100 draw calls -> 1
mobile: ~20 FPS -> ~50 FPSThe barrel and tree figures are the whole argument for instancing, and they are the argument the game's own maps ended up making eleven months later: 38 shipping maps of corridors, crates, barrels and foliage, on phones, in a browser.
Quality Detection With a Potato Setting
potato is a real preset name in the source. That detail does more work than a benchmark table would. A preset called potato is someone who has looked at a device matrix and decided the honest floor has a name.
MenuSystem also stopped importing GameTimer directly and started listening for events, which is the small decoupling that makes the next eleven months of architectural work possible.