A top-down photography observation game. The player controls a camera viewfinder and photographs NPCs. Each capture advances the narrative, changes the world, and escalates the chaos.
NPC movement is fully decoupled from the NPC class via a swappable NPCBehaviour interface. Wander, Flee, Flock, AngryNPC (3-state machine), and Journalist behaviours can be assigned at runtime with setBehaviour().
A dedicated PhaseManager tracks captures and handles all narrative phase logic, completely decoupled from the game loop. The game class only reads the current phase - it never directs it.
createSpecialEntity() uses the Factory Method pattern to construct the correct phase-specific entity. Ownership transfers cleanly via std::unique_ptr. The Game class has no knowledge of construction details.
Entities are built from composition, not deep inheritance. NPC owns NPCBehaviour and Animation as components. The abstract Entity base provides shared interface via pure virtual methods.
Left-click triggers a shutter flash, SFML View zoom sequence, and AABB intersection check against all NPC bounds in frame. Highlighted NPCs receive a yellow overlay confirming capture. Special entities in frame trigger phase transitions.
The Animation class manages sprite sheet playback at 0.1s per frame across 3 horizontal frames. Visual states (default, hat, scared, angry, screaming) are driven by texture swaps per NPC state change.
The game draws inspiration from observation and reaction mechanics in other titles - specifically the idea that the player's actions are the catalyst for world change, not just a response to it.
calculateMovement() interface across all behaviour types.
Entity hierarchy, collision, state management, camera, phase management and the animation system.
Strategy, State, Factory Method, Composition - each with the specific problem it solves and where it lives in the codebase.
The four-phase narrative pipeline. Introduction, FirstCapture, Tension, Escalation - how each phase changes the world.
NPC count, behaviour overhead, and performance notes from development profiling.
In-engine screenshots. Gameplay, NPCs in action, phase transitions, capture flash. Click any image to open the lightbox.