How 5tefan543/uibk_cpp_project works
This is a C++ arena-survival roguelike. The main loop polls input, updates the controller’s current state, then renders its view; gameplay advances waves and stages, spawning enemies and running ECS systems, with progression-store, save/load, menus, audio, and debug capabilities around that loop. Source excerpts confirm the main loop, state transitions, and game update/render responsibilities. Other gameplay systems and UI details are represented from documented capabilities and the source index; their internal calls are not asserted where source was unsampled.
Main entry points: game.cpp Game orchestration · state_manager.cpp State manager · persistence_manager.cpp Save and load · main.cpp Frame loop
Components 23
Application loop
- Frame loop
apps/main.cpp
Control and states
- Controller
src/controller/controller.cpp - State manager
src/controller/state/state_manager.cpp - Menu and game states
src/controller/state/state.cpp
Gameplay simulation
- Game orchestration
src/game/game.cpp - Entity registry
include/game/ecs/registry.hpp - Spatial lookup
src/game/location_table.cpp - Player controls
src/game/systems/input_system.cpp - Enemy AI
src/game/systems/enemy_ai_system.cpp - Wave spawning
src/game/systems/spawn_enemy_system.cpp - Combat systems
include/game/ecs/systems - Movement and collision
include/game/ecs/systems - Animation and sound
include/game/ecs/systems
Progression and persistence
- Progression store
src/game/store/progression_store.cpp - Save and load
src/controller/persistence/persistence_manager.cpp - Game configuration
include/config/game_config.hpp - Leaderboard
include/controller/persistence/leaderboard.hpp
UI and audio
- Input handling
src/ui/input_handler.cpp - UI and window
src/ui/ui.cpp - View renderer
src/ui/renderer.cpp - Audio playback
src/audio/audio_controller.cpp - Debug tools
src/ui/debug_ui.cpp
Other components
- Player
Connections 27
- Player → UI and window: provides input
- Frame loop → UI and window: polls input
apps/main.cpp - UI and window → Input handling: polls through
- Frame loop → Controller: updates
apps/main.cpp - Controller → State manager: updates state
- Frame loop → State manager: gets current state
apps/main.cpp - State manager → Menu and game states: creates and transitions
src/controller/state/state_manager.cpp - Frame loop → View renderer: renders view
apps/main.cpp - UI and window → View renderer: renders through
- Menu and game states → Game orchestration: runs gameplay
- State manager → Progression store: opens store
src/controller/state/state_manager.cpp - State manager → Audio playback: plays state audio
src/controller/state/state_manager.cpp - Game orchestration → Entity registry: updates entities
src/game/game.cpp - Game orchestration → Spatial lookup: updates spatial table
src/game/game.cpp - Game orchestration → Wave spawning: spawns wave
src/game/game.cpp - Game orchestration → Enemy AI: updates enemies
src/game/game.cpp - Game orchestration → Player controls: updates controls
- Game orchestration → Combat systems: runs combat
- Game orchestration → Movement and collision: runs movement
- Game orchestration → Animation and sound: builds game view
- Game orchestration → Save and load: saves run
src/game/game.cpp - Progression store → Save and load: saves store
src/game/store/progression_store.cpp - Save and load → Game configuration: loads configuration
- State manager → Save and load: loads game
- Game orchestration → Game configuration: uses settings
- Debug tools → Game orchestration: controls debug session
- Save and load → Leaderboard: stores scores