THE BLUEPRINT
2/8 milestones complete
Phase 0 - Foundation & Tooling
Groundwork (2020-2025): Ghidra decompilation pipeline, ~8,300 functions identified in TOD.exe, Visual Studio build system (DLL injection + EXE targets), restools asset extractor, in-engine debug menu. Project bootstrapped from raw binary to a compile-able reconstruction.
Phase 1 - Core Memory System
Custom BestFitAllocator (20-bucket best-fit free list with same-size sub-lists) and the 10-arena MemoryManager fully reconstructed and verified against Ghidra. Realloc, TryExpandBy, PlacementNewAligned complete. Full engine documentation published (memory, rendering, scene systems).
Phase 2 - Rendering Pipeline
DirectX 9 fixed-function pipeline. DONE: RenderParticle, RenderTexturedQuad_3 (5-mode billboard), GfxInternal_Dx9 compiles and links. Remaining: real DDS texture loader (currently stubbed).
Phase 3 - Scene & Game Loop
Scene system: lifecycle, asset block hooks, ClearCollisionCaches, ResetScriptSlots, UpdateModelsLighting, UpdateNodesWithScripts implemented. Scene::Update's 9 leaf helpers reconstructed. CountBlockingScriptNodes stubbed (TODO real impl).
Phase 4 - Asset Pipeline
Open-source the asset format. Build a .naz / .main block parser, model/texture/animation/bone loaders, and a standalone asset viewer in restools. Goal: load original game assets without the retail loader. Prerequisite for the standalone EXE.
Phase 5 - Gameplay Systems
The game logic layer. Reverse physics (PhysSystem, collision response), scripting VM (ScriptThread), AI/character behaviour, weapons, and vehicles. Clear the remaining ~268 TODO stubs prioritized by critical EXE path. Goal: characters move, shoot, and react.
Phase 6 - Standalone Executable
Two binary modes both build. (1) dinput8.dll injection into retail TOD.exe - boots fine for 20+s then stalls on asset checksum bug. (2) Standalone KapowEngineEditor.exe - 2.13 MB PE32 i386 GUI app, no retail dependency. The Editor binary is the actual project deliverable. NEXT: fix the asset loader so the Editor can boot into a usable state.
Phase 7 - Portability & Polish
Beyond the original. Platform abstraction layer (#ifdef PLATFORM_*) at the File/Window/GfxInternal seams, a Linux build, modern graphics API translation (Vulkan/DX12), and performance work. Goal: Total Overdose running natively on modern hardware and other OSes.