How joch-21/dsp_projec works
Copperline is an SFML-based tower-defense/strategy game. A player acts through the real-time UI; the Game session coordinates map construction, technology unlocks, resource production, enemy waves and combat, with save/load and build undo supporting the session. The graph preserves those distinct domain stages and the collection structures that support map, wave, resource and command state. Evidence is limited to the supplied excerpts and SOURCE INDEX; some runtime call paths are therefore shown as unverified rather than asserted.
Main entry points: Game.cpp Game Session · Map.cpp Map and Tech · SaveService.cpp Save Service · ResourceStore.cpp Resource Store
Components 20
Player Experience
- Realtime UI
dsp_proj/GameUI.cpp
Game Simulation
- Game Session
dsp_proj/Game.cpp - Building Visitors
dsp_proj/BuildingVisitor.cpp - Build Undo
dsp_proj/CommandManager.cpp - Save Service
dsp_proj/SaveService.cpp
Game Domain
- Map and Tech
dsp_proj/Map.cpp - Buildings
dsp_proj/Building.cpp - Resource Store
dsp_proj/ResourceStore.cpp - Wave Manager
dsp_proj/WaveManager.cpp - Spawn Events
dsp_proj/SpawnEvent.h - Enemy State
dsp_proj/Enemy.h - Save File
dsp_proj/savegame.txt
Data Structures
- Linked List
dsp_proj/List.h - Doubly Linked Node
dsp_proj/DoublyLinkedNode.h - List Iterator
dsp_proj/DoublyLinkedNodeIterator.h - Binary Tree
dsp_proj/BTree.h - Queue
dsp_proj/Queue.h - Stack
dsp_proj/Stack.h - Singly Linked Node
dsp_proj/SinglyLinkedNode.h
Other components
- Player
Connections 27
- Player → Realtime UI: plays through
- Realtime UI → Game Session: requests actions
- Game Session → Map and Tech: manages map
- Game Session → Resource Store: manages resources
- Game Session → Wave Manager: manages waves
- Game Session → Build Undo: records builds
- Game Session → Save Service: delegates saves
- Game Session → Building Visitors: runs production
- Map and Tech → Buildings: stores buildings
- Map and Tech → Resource Store: spends unlock costs
- Map and Tech → Linked List: stores buildings in
- Map and Tech → Binary Tree: models tech with
- Linked List → Doubly Linked Node: links elements
dsp_proj/List.h - Linked List → List Iterator: iterates via
dsp_proj/List.h - Wave Manager → Queue: queues waves
- Wave Manager → Spawn Events: creates events
dsp_proj/WaveManager.cpp - Building Visitors → Buildings: visits types
- Building Visitors → Resource Store: updates production
- Build Undo → Stack: stores undo history
- Build Undo → Buildings: records build types
- Save Service → Map and Tech: serializes map
- Save Service → Resource Store: serializes resources
- Save Service → Wave Manager: serializes wave state
- Save Service → Save File: reads and writes
- Resource Store → Singly Linked Node: chains buckets with
- Realtime UI → Buildings: renders buildings
dsp_proj/GameUI.cpp - Realtime UI → Enemy State: tracks combat state