Nightshift is a top-down stealth level built on Storm! Engine v2. Slip through a dark office, lift two pickups from under the patrols' noses, and reach the exit before a guard sees you.
- Core loop: read a patrol → cross its cone in the dark → get seen → get away → repeat until extraction
- Five-state guard brain: patrol → suspicious → alert (double speed) → expanding search → give up and return to the route
- Vision cones that are honest: the translucent cone you see is the same range and angle the guard tests with; catch is only at touching range
- Darkness is mechanical, not mood: standing in shadow triples the time a guard needs to notice you
- Guards walk to your last known position, never to where you are - losing them is a real mechanic, and watching one confidently search the wrong room is the tutorial
- Five patrol routes, one guard each: the objective room, the long corridor, the spawn room, the exit block
- Two pickups before the exit lights up - grab the cyan one first, then the yellow
- Pure-function unit tests cover the cone test, the notice rule and all five brain transitions (
tests/, run withmake && ./vision_test && ./notice_test && ./brain_test)
Clean C++17, no frameworks beyond SDL2 + the engine. Build: make && make run.
Built on Storm! Engine v2 2.3.0.
| Input | Action |
|---|---|
↑ ↓ ← → |
Move |
R |
Restart (on the result screen) |
Esc |
Quit |
Gamepad (Xbox-style layout):
| Input | Action |
|---|---|
| Left stick | Move (proportional) |
| D-pad | Move |
| A / Start | Restart (on the result screen) |
As an example for Storm! Engine. Stealth is the load-bearing test for three engine pieces used as designed: one LightingOverlay light on the player, ContactSystem begin-contact callbacks for the objective, the exit and touching range, and a camera-clamped view drawn through RenderSystem. Everything else - the cone test, noticing, the brain - is pure, testable code with no engine dependency, which is what keeps a 200-line game honest.
No sound, no second level, no AI navigation mesh. Guards follow hand-placed routes, so their waypoints are chosen to stay inside walkable tiles - they have no wall collision.
The engine must be installed first (sudo make -f Makefile.debian install in the engine tree). Then:
make # build
make run # run from this directory - asset paths are CWD-relativeBDD specs via igloo, one binary per area. The pure logic (level queries, collision, vision, noticing, the guard brain) links without the renderer.
make -f Makefile.specs test # every spec
make -f Makefile.specs test-collision # one areaDownload the SDK zip from the Storm! Engine releases, unpack it, and point SDK at the unpacked directory:
sudo apt install mingw-w64
make -f Makefile.win SDK=~/sdk/stormengine2-2.3.0-win64MinGW-w64 only. MSVC cannot link this, the import library and C++ ABI are GCC's.
The engine is portable, so this project is portable. You will need a platform Makefile and a platform main() that calls Game::Run(); see the engine's examples/.
SCAFFOLD.md documents the layout and the traps that come with it.
Totally free, do what you want, but don't blame me if it breaks. LICENSE.md is the full text.
