How redstoneteddy/the-last-assembly works
The Last Assembly is a Pygame roguelite tower-defense game. A run starts with map and difficulty selection, moves through a shop/build phase, then spawns increasingly difficult enemy waves against the player’s defenses; earnings and unlocks support replay. The graph preserves the documented customization systems and the runtime state, rendering, and statistics layers. Some subsystem links are documented in the README or SOURCE INDEX; unsampled implementation details are not inferred.
Main entry points: main.py Game loop · shop/main.py Shop phase · data_class.py Game state · building.py Mods
Components 24
Run flow
- Game loop
main.py - Menus
menu/main_menu.py - Map selection
menu/map_selection.py - Map and paths
map/map_info.py - Shop phase
shop/main.py - Collection menu
menu/collection.py
Battle systems
- Wave generation
enemy/wave_gen.py - Wave control
enemy/wave_handler.py - Enemy movement
enemy/move.py - Enemy state
enemy/enemy_data_class.py - Tower behavior
towers/base_tower/base.py - Tower shooting
towers/base_tower/shooting.py
Shop and builds
- Zones
zones/building.py - Specialists
specialists/base/base.py - Mods
mods/building.py - Events
events/building.py - Event definitions
events/info_data.py - Mod definitions
mods/info_data.py
State and presentation
- Game state
data_class.py - Battle rendering
renderer/towers.py - HUD
renderer/hud.py - Run statistics
statistic/statistic.py - Sound effects
sound/sfx.py
Other components
- Player
Connections 28
- Player → Menus: opens game
readme.md - Player → Map selection: chooses map
readme.md - Map selection → Map and paths: selects map
readme.md - Player → Shop phase: buys items
readme.md - Shop phase → Tower behavior: offers towers
shop/main.py - Shop phase → Specialists: offers specialists
shop/main.py - Shop phase → Mods: offers mods
shop/main.py - Shop phase → Zones: offers zones
shop/main.py - Shop phase → Events: offers events
shop/main.py - Events → Event definitions: loads definitions
events/building.py - Mods → Mod definitions: loads definitions
mods/building.py - Game loop → Game state: initializes state
main.py - Game loop → Wave control: ticks waves
main.py - Wave control → Wave generation: generates waves
enemy/wave_handler.py - Game loop → Enemy movement: moves enemies
main.py - Enemy movement → Enemy state: updates state
enemy/move.py - Game loop → Zones: runs placement
main.py - Game loop → Mods: runs placement
main.py - Game loop → Events: runs placement
main.py - Tower behavior → Tower shooting: delegates shooting
towers/base_tower/base.py - Game loop → Battle rendering: draws towers
main.py - Game loop → HUD: draws HUD
main.py - Game loop → Run statistics: updates statistics
main.py - Game loop → Sound effects: updates sound
main.py - Player → Collection menu: views unlocks
readme.md - Game state → Enemy state: holds enemy state
data_class.py - Game state → Run statistics: owns run statistics
data_class.py - Game state → Sound effects: owns sound system
data_class.py