How imdrkenzo/flappy-hat works
Flappy Hat is a single-file Pygame arcade game. The player starts from the menu, controls the animated hat through ruler gaps, earns score and rank praise, and reaches a game-over screen on collision. The graph separates interaction, game orchestration, gameplay entities, and presentation/assets. The excerpt does not show all rendering and update logic, so only documented capabilities and directly evidenced interactions are included; the image assets are documented in the README but absent from the supplied file tree.
Main entry points: flappyhat.py Game Loop
Components 8
Player Interaction
- Input Handling
flappyhat.py
Game Runtime
- Game Loop
flappyhat.py - Animated Hat
flappyhat.py - Ruler Obstacles
flappyhat.py - Score and Ranks
flappyhat.py
Presentation
- Game Display
flappyhat.py - Game Images
flappyhat.py
Other components
- Player
Connections 8
- Player → Input Handling: sends controls
- Input Handling → Game Loop: dispatches events
- Game Loop → Animated Hat: moves and animates
- Game Loop → Ruler Obstacles: creates and moves
- Game Loop → Score and Ranks: updates score
- Game Loop → Game Display: draws state
- Game Images → Animated Hat: provides frames
- Game Images → Ruler Obstacles: provides images