I had an old prototype on another PC: a window, a camera, some shooting, some collision. It worked, sort of. But I could not explain half of it, and I did not know what graphics API or window library it used without opening it up. So I made a decision: Night Warrant starts again, from an empty folder.
What Night Warrant is
A slow, tense, close-quarters police shooter. You lead a special intervention unit through fictional cities in Europe and the United States, and every country has its own rules of engagement. You can talk an armed suspect down, or watch it escalate. Walls break and become doors. And some secrets only make sense across several missions.
Why an own engine
Two reasons. First, the details that make this genre work are all systems: how light falls through a doorway, how a gunshot sounds behind a closed door, how a suspect decides whether to give up. I want to understand those systems completely. Second, this project is also my portfolio. Every line has to be something I can explain in a job interview.
The rules I am holding myself to:
- C++20, clear over clever. If I cannot explain a line, it does not go in.
- I write the engine. Libraries only for the platform layer (SDL3), network transport and Steam.
- A fixed 60 Hz simulation. Rendering and audio only present it, so the same code can run as a headless co-op server.
- Data over code. A hard-coded feel number is a bug.
- Always playable. One system at a time, no big rewrites.
The heart of that is a fixed timestep. The game advances in equal steps, however fast the screen refreshes:
constexpr double kTickSeconds = 1.0 / 60.0; double accumulator = 0.0; while (running) { accumulator += frameTimer.elapsedSeconds(); while (accumulator >= kTickSeconds) { simulation.step(input.sampleCommand()); // same input, same result accumulator -= kTickSeconds; } renderer.draw(simulation, accumulator / kTickSeconds); // interpolate between ticks }
Keeping score
The roadmap has twenty phases, from this empty folder to Steam Early Access. Each one ends with an achievement and a test it has to pass. Every phase has an estimate on the roadmap. If a phase runs far past it, I cut it down to its minimum. Those estimates will not always hold. That is the point.
Next
Phase 0, Know Thy Engine: a repository that builds with one command on Windows and Linux, CI on every push, the strictest compiler warnings and sanitizers from the first commit. Not glamorous, but every later phase stands on it.
See you in the next entry.