How daniel-goldacker/the-office-game works
The repository is a Pygame office-themed action game. The player enters through a title screen and character-name prompt, then plays through enemy waves: movement, attacks and abilities interact with enemies, while coffee restores health and a barista replenishes cups. The main module coordinates the game loop, simulation, audio and HUD; core modules provide entities, world setup and rendering helpers. Source excerpts show these boundaries, but not every call site, so uncertain relationships are omitted.
Main entry points: main.py Game loop · world.py World and waves · entities.py Entity movement · config.py Game configuration
Components 18
Game interface
- Start and end screens
src/ui/screens.py - Gameplay HUD
src/main.py
Game runtime
- Game loop
src/main.py - Gameplay simulation
src/main.py - Sound playback
src/main.py - Game configuration
src/core/config.py - Geometry helpers
src/core/utils.py
Game domain
- World and waves
src/core/world.py - Coffee stations
src/core/world.py - Barista refill
src/main.py - Player entity
src/core/entities.py - Enemy behavior
src/core/entities.py - NPC behavior
src/core/entities.py - Entity movement
src/core/entities.py
World presentation
- Office and minimap
src/core/world.py - Character sprites
src/render/sprites.py - Sound assets
src/assets/sounds
Other components
- Player
Connections 24
- Player → Start and end screens: starts and names
src/ui/screens.py - Player → Game loop: provides input
src/main.py - Game loop → Start and end screens: shows screens
src/main.py - Game loop → Gameplay simulation: updates gameplay
src/main.py - Game loop → Gameplay HUD: renders HUD
src/main.py - Game loop → Sound playback: loads and adjusts
src/main.py - Game loop → World and waves: uses world logic
src/main.py - Gameplay simulation → Player entity: updates player
src/main.py - Gameplay simulation → Enemy behavior: updates enemies
src/main.py - Gameplay simulation → Barista refill: refills cups
src/main.py - Gameplay simulation → Coffee stations: checks healing
src/main.py - World and waves → Character sprites: generates sprites
src/core/world.py - World and waves → Entity movement: creates entities
src/core/world.py - World and waves → Office and minimap: provides world helpers
src/core/world.py - World and waves → Coffee stations: places stations
src/core/world.py - Player entity → Entity movement: inherits movement
src/core/entities.py - Enemy behavior → Entity movement: inherits movement
src/core/entities.py - NPC behavior → Entity movement: inherits movement
src/core/entities.py - Entity movement → Geometry helpers: uses clamp
src/core/entities.py - Enemy behavior → Geometry helpers: measures distance
src/core/entities.py - World and waves → Game configuration: reads settings
src/core/world.py - Entity movement → Game configuration: reads settings
src/core/entities.py - Game loop → Game configuration: reads settings
src/main.py - Sound playback → Sound assets: plays sounds
src/main.py