How tharana-dev/rabbit-hunter-game works
Rabbit Hunter is a single-process Turtle arcade game with Pygame audio. The player starts or resumes play through keyboard controls; the game loop moves the rabbit, resolves carrot, trap, kit, and hunter interactions, updates score and health, and ends the session when required. High scores persist in a text file, while a separate image helper generates and registers scaled rabbit sprites. The loop and collision branches are partly unsampled, so edges for those features rely on the README; the source excerpts show initialization, image generation, persistence, and selected game-loop behavior.
Main entry points: game.py Game loop · image_maker.py Scaled sprites · highscore.txt High score file
Components 17
Gameplay
- Player controls
game.py - Game loop
game.py - Carrot scoring
game.py - Trap damage
game.py - Health kits
game.py - Hunter encounter
game.py - Health system
game.py - Score display
game.py
Assets and audio
- Scaled sprites
image_maker.py - Sound effects
game.py - Background music
game.py
Session and persistence
- Start and pause
game.py - High score
game.py - Game over
game.py
Other components
- Player
- Keyboard
- High score file
highscore.txt
Connections 20
- Keyboard → Player controls: controls
readme.md - Player controls → Start and pause: starts or pauses
readme.md - Start and pause → Game loop: runs
readme.md - Game loop → Player controls: moves
readme.md - Game loop → Carrot scoring: checks collisions
readme.md - Game loop → Trap damage: checks collisions
readme.md - Game loop → Health kits: checks collisions
readme.md - Game loop → Hunter encounter: updates encounter
readme.md - Trap damage → Health system: reduces
readme.md - Health kits → Health system: restores
readme.md - Carrot scoring → Score display: updates
readme.md - Hunter encounter → Game over: can trigger
readme.md - Health system → Game over: can trigger
readme.md - Game loop → Game over: ends on bounds
game.py - Game loop → High score: saves new record
game.py - High score → High score file: reads and writes
game.py - Player controls → Scaled sprites: loads images
game.py - Scaled sprites → Player: registers sprites
image_maker.py - Game loop → Sound effects: plays effects
readme.md - Start and pause → Background music: starts playback
readme.md