How turjocode/zombie-survival-game works
Zombie Survival is a real-time, tile-based Pygame game. The main loop builds a generated maze, accepts player movement and shooting, updates zombies that pursue the player with type-specific pathfinding, resolves damage and collisions, and renders health, kills, and survival time. The graph reflects calls visible in the sampled source; README-described capabilities are included where supported, without assuming unshown integrations.
Main entry points: main.py Game loop · zombies.py Zombie · player.py Player · map.py Generated map
Components 11
Game runtime
- Game loop
main.py - HUD and rendering
main.py
World and navigation
- Generated map
map.py - Maze generation
map.py - Pathfinding algorithms
pathfinding.py
Shared game logic
- Game constants and types
utils.py
Other components
- Player input
- Pygame CE
Connections 26
- Player input → Game loop: sends input
- Game loop → Generated map: creates
- Game loop → Player: creates
- Game loop → Zombie: spawns
- Generated map → Maze generation: generates maze
- Game loop → Player: moves and fires
- Player → Generated map: checks walls
- Game loop → Player: updates bullets
- Player → Bullet: creates and updates
- Bullet → Generated map: checks collision
- Game loop → Zombie: updates
- Zombie → Pathfinding algorithms: requests route
- Zombie → Generated map: checks movement
- Game loop → Zombie: checks bullet hits
- Game loop → HUD and rendering: renders game state
- HUD and rendering → Generated map: draws map
- HUD and rendering → Player: draws player
- HUD and rendering → Zombie: draws zombies
- Zombie → Player: deals attack damage
- Game loop → Player: records kills
- Pathfinding algorithms → Game constants and types: uses tile costs
- Zombie → Game constants and types: uses distance and types
- Game loop → Pygame CE: uses display and input
- Player → Pygame CE: uses geometry and drawing
- Generated map → Pygame CE: draws tiles
- Zombie → Pygame CE: draws actors