Skip to content

Latest commit

 

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Nightshift

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 with make && ./vision_test && ./notice_test && ./brain_test)

Clean C++17, no frameworks beyond SDL2 + the engine. Build: make && make run.

Nightshift

Built on Storm! Engine v2 2.3.0.

Controls

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)

Why this game

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.

What it will not showcase

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.

Build

Linux

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-relative

Tests

BDD 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 area

Windows (x64, MinGW-w64 cross-compile from Linux)

Download 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-win64

MinGW-w64 only. MSVC cannot link this, the import library and C++ ABI are GCC's.

Raspberry Pi / Android / LibNX

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.

License

Totally free, do what you want, but don't blame me if it breaks. LICENSE.md is the full text.

About

Top-down stealth game built on Storm! Engine v2. Dodge visison cones, stick to the shadows.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Sponsor this project

Used by

Contributors

Languages