How kareem-hany-77/lantern-keeper works
Lantern Keeper is a small GLUT platform game. The player selects survival or a numbered level, enters the play screen, and moves and jumps across platforms; gameplay draws the world and HUD. The graph reflects the implemented prototype, including menu/input dispatch, movement and rendering. The README gives no further capability detail, and sampled gameplay explicitly leaves levels and other mechanics as future work; unsampled modules are represented only where the source index supports them.
Main entry points: play.cpp Gameplay screen · game.cpp Game state and dispatch · movement.cpp Player movement · menu.cpp Menu and level select
Components 14
Game runtime
- Application entry
main.cpp - Game state and dispatch
src/core/game.cpp - Game configuration
src/core/config.h - Input state
src/core/input.cpp
Gameplay
- Gameplay screen
src/gameplay/play.cpp - Player entity
src/entities/player.cpp - Player movement
src/physics/movement.cpp - Platform world
src/world/platform.cpp
UI and rendering
- Menu and level select
src/ui/menu.cpp - Shape drawing
src/render/shapes.cpp - UI controls
src/ui/ui.cpp - Text drawing
src/ui/text.cpp
Other components
- Player
- GLUT runtime
Connections 23
- Player → GLUT runtime: provides input
- GLUT runtime → Application entry: starts callbacks
main.cpp - Application entry → Game state and dispatch: initializes and dispatches
main.cpp - Game state and dispatch → Menu and level select: routes menu events
src/core/game.cpp - Game state and dispatch → Gameplay screen: routes play events
src/core/game.cpp - Game state and dispatch → Input state: updates key state
src/core/game.cpp - Menu and level select → Game state and dispatch: starts game or changes state
src/ui/menu.cpp - Menu and level select → UI controls: tests button hits
src/ui/menu.cpp - Menu and level select → Text drawing: draws menu labels
src/ui/menu.cpp - Gameplay screen → Platform world: loads and draws platforms
src/gameplay/play.cpp - Gameplay screen → Player entity: initializes and draws
src/gameplay/play.cpp - Gameplay screen → Player movement: updates player
src/gameplay/play.cpp - Gameplay screen → Input state: resets input
src/gameplay/play.cpp - Gameplay screen → Game state and dispatch: returns to menu
src/gameplay/play.cpp - Gameplay screen → Text drawing: draws HUD
src/gameplay/play.cpp - Player movement → Input state: reads actions
src/physics/movement.cpp - Player movement → Platform world: checks collisions
src/physics/movement.cpp - Player entity → Shape drawing: draws entity
src/entities/player.cpp - Platform world → Shape drawing: draws platforms
src/world/platform.cpp - UI controls → Text drawing: draws button labels
src/ui/ui.cpp - Game state and dispatch → Game configuration: uses world dimensions
src/core/game.cpp - Player movement → Game configuration: uses physics constants
src/physics/movement.cpp - Gameplay screen → Game configuration: uses level and mode values
src/gameplay/play.cpp