How madihaiqbal417-droid/shift_game works
SHIFT is a single-file SFML platform game about switching between mirrored realities across three levels. The player starts a run, moves and jumps, shifts worlds to navigate hazards, and reaches the goal while managing a nightmare meter. src/main.cpp owns the game state, simulation, level data, audio, and drawing rather than delegating to separate modules. The excerpts show input, physics, audio playback, and rendering; asset-loading details and some level transitions are omitted, so those connections are not inferred.
Main entry points: main.cpp Game Loop
Components 11
Game Flow
- Game Loop
src/main.cpp - Game Progress
src/main.cpp
World Simulation
- Level Setup
src/main.cpp - World Shifting
src/main.cpp - Movement Physics
src/main.cpp - Hazards and Monsters
src/main.cpp - Nightmare Meter
src/main.cpp
Presentation
- Game Drawing
src/main.cpp - Sound and Music
src/main.cpp
Other components
- Player
- SFML Window
Connections 10
- Player → Game Loop: provides input
src/main.cpp - Game Loop → World Shifting: handles shift
src/main.cpp - Game Loop → Movement Physics: updates movement
src/main.cpp - Game Loop → Hazards and Monsters: updates hazards
src/main.cpp - Game Loop → Game Progress: updates state
src/main.cpp - Game Loop → Level Setup: loads levels
src/main.cpp - Game Loop → Nightmare Meter: updates meter
src/main.cpp - Game Loop → Sound and Music: plays sounds
src/main.cpp - Game Loop → Game Drawing: draws scene
src/main.cpp - Game Drawing → SFML Window: draws to
src/main.cpp