# prateekm180/game-dev architecture

> Architecture diagram of the GitHub repository prateekm180/game-dev, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prateekm180/game-dev
- Repository: https://github.com/prateekm180/game-dev

## Overview

Game-Dev is a collection of three independently run Python games. Players start each game and interact through its controls; the runtime updates game state, checks collisions and objectives, then displays the result. The graph separates each game’s main runtime stages. Pac-Man details come from a partial source excerpt; Snake and Flappy Block are represented from their sampled scripts, so unsampled details and uncertain links are omitted.

Main entry points: [`Pacman/Pacman.py/Pacman.py`](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py) (Game controller), [`Snake-Game/SnakeGame.py/SnakeGames.py`](https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py) (Game loop), [`Flappy-Block/FlappyBlock.py/FlappyBirdGame.py`](https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py) (Game loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flappy["Flappy Block"]
  node_flappy_entry["Game entry<br/>[FlappyBirdGame.py]"]
  node_flappy_setup["Screen setup<br/>[FlappyBirdGame.py]"]
  node_flappy_start["Start screen<br/>[FlappyBirdGame.py]"]
  node_flappy_loop["Game loop<br/>[FlappyBirdGame.py]"]
  node_flappy_pipes["Pipe handling<br/>[FlappyBirdGame.py]"]
  node_flappy_result["Score and result<br/>[FlappyBirdGame.py]"]
  node_flappy_turtle["Turtle display"]
end

subgraph group_pacman["Pac-Man"]
  node_pac_entry["Game entry<br/>[Pacman.py]"]
  node_pac_game["Game controller<br/>[Pacman.py]"]
  node_pac_menu["Menu controls<br/>[Pacman.py]"]
  node_pac_maze["Maze state<br/>[Pacman.py]"]
  node_pac_entities["Character movement<br/>[Pacman.py]"]
  node_pac_rules["Game rules<br/>[Pacman.py]"]
  node_pac_render["Game display<br/>[Pacman.py]"]
  node_pac_sound["Sound manager<br/>[Pacman.py]"]
end

subgraph group_snake["Snake Game"]
  node_snake_entry["Game entry<br/>[SnakeGames.py]"]
  node_snake_menu["Menu system<br/>[SnakeGames.py]"]
  node_snake_loop["Game loop<br/>[SnakeGames.py]"]
  node_snake_movement["Snake movement<br/>[SnakeGames.py]"]
  node_snake_food["Food and growth<br/>[SnakeGames.py]"]
  node_snake_rules["Collision and score<br/>[SnakeGames.py]"]
  node_snake_audio["Audio controls<br/>[SnakeGames.py]"]
end

node_player(("Player"))
node_pac_pygame["Pygame runtime"]
node_snake_turtle["Turtle display"]
node_snake_pygame["Pygame audio"]

node_player -->|"starts"| node_flappy_entry
node_flappy_entry -->|"creates screen"| node_flappy_setup
node_flappy_entry -->|"shows start"| node_flappy_start
node_player -->|"starts game"| node_flappy_start
node_flappy_entry -->|"runs loop"| node_flappy_loop
node_player -->|"flaps"| node_flappy_loop
node_flappy_loop -->|"creates and moves"| node_flappy_pipes
node_flappy_loop -->|"updates score"| node_flappy_result
node_flappy_loop -->|"draws game"| node_flappy_turtle
node_flappy_start -->|"draws prompt"| node_flappy_turtle
node_flappy_result -->|"shows result"| node_flappy_turtle
node_player -->|"starts"| node_pac_entry
node_pac_entry -->|"runs game"| node_pac_game
node_player -->|"sends input"| node_pac_game
node_pac_game -->|"handles menu"| node_pac_menu
node_pac_game -->|"loads maze"| node_pac_maze
node_pac_game -->|"updates characters"| node_pac_entities
node_pac_game -->|"checks game state"| node_pac_rules
node_pac_game -->|"draws screen"| node_pac_render
node_pac_game -->|"controls audio"| node_pac_sound
node_pac_render -->|"draws with"| node_pac_pygame
node_pac_game -->|"handles events"| node_pac_pygame
node_player -->|"starts"| node_snake_entry
node_snake_entry -->|"draws menu"| node_snake_menu
node_player -->|"selects action"| node_snake_menu
node_snake_menu -->|"starts or resumes"| node_snake_loop
node_player -->|"sends controls"| node_snake_loop
node_snake_loop -->|"moves snake"| node_snake_movement
node_snake_loop -->|"checks food"| node_snake_food
node_snake_loop -->|"checks collisions"| node_snake_rules
node_snake_loop -->|"plays sounds"| node_snake_audio
node_snake_loop -->|"updates display"| node_snake_turtle
node_snake_menu -->|"draws menu"| node_snake_turtle
node_snake_audio -->|"uses mixer"| node_snake_pygame

click node_flappy_entry "https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py"
click node_flappy_setup "https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py"
click node_flappy_start "https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py"
click node_flappy_loop "https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py"
click node_flappy_pipes "https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py"
click node_flappy_result "https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py"
click node_pac_entry "https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py"
click node_pac_game "https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py"
click node_pac_menu "https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py"
click node_pac_maze "https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py"
click node_pac_entities "https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py"
click node_pac_rules "https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py"
click node_pac_render "https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py"
click node_pac_sound "https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py"
click node_snake_entry "https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py"
click node_snake_menu "https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py"
click node_snake_loop "https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py"
click node_snake_movement "https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py"
click node_snake_food "https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py"
click node_snake_rules "https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py"
click node_snake_audio "https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_flappy_entry,node_flappy_setup,node_flappy_start,node_flappy_loop,node_flappy_pipes,node_flappy_result,node_flappy_turtle toneBlue
class node_pac_entry,node_pac_game,node_pac_menu,node_pac_maze,node_pac_entities,node_pac_rules,node_pac_render,node_pac_sound toneAmber
class node_snake_entry,node_snake_menu,node_snake_loop,node_snake_movement,node_snake_food,node_snake_rules,node_snake_audio toneMint
class node_player,node_pac_pygame,node_snake_turtle,node_snake_pygame toneIndigo
```

## Components

### Flappy Block

- [Game entry](https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py): `Flappy-Block/FlappyBlock.py/FlappyBirdGame.py`
- [Screen setup](https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py): `Flappy-Block/FlappyBlock.py/FlappyBirdGame.py`
- [Start screen](https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py): `Flappy-Block/FlappyBlock.py/FlappyBirdGame.py`
- [Game loop](https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py): `Flappy-Block/FlappyBlock.py/FlappyBirdGame.py`
- [Pipe handling](https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py): `Flappy-Block/FlappyBlock.py/FlappyBirdGame.py`
- [Score and result](https://github.com/prateekm180/game-dev/blob/main/Flappy-Block/FlappyBlock.py/FlappyBirdGame.py): `Flappy-Block/FlappyBlock.py/FlappyBirdGame.py`
- **Turtle display**

### Pac-Man

- [Game entry](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py): `Pacman/Pacman.py/Pacman.py`
- [Game controller](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py): `Pacman/Pacman.py/Pacman.py`
- [Menu controls](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py): `Pacman/Pacman.py/Pacman.py`
- [Maze state](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py): `Pacman/Pacman.py/Pacman.py`
- [Character movement](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py): `Pacman/Pacman.py/Pacman.py`
- [Game rules](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py): `Pacman/Pacman.py/Pacman.py`
- [Game display](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py): `Pacman/Pacman.py/Pacman.py`
- [Sound manager](https://github.com/prateekm180/game-dev/blob/main/Pacman/Pacman.py/Pacman.py): `Pacman/Pacman.py/Pacman.py`

### Snake Game

- [Game entry](https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py): `Snake-Game/SnakeGame.py/SnakeGames.py`
- [Menu system](https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py): `Snake-Game/SnakeGame.py/SnakeGames.py`
- [Game loop](https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py): `Snake-Game/SnakeGame.py/SnakeGames.py`
- [Snake movement](https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py): `Snake-Game/SnakeGame.py/SnakeGames.py`
- [Food and growth](https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py): `Snake-Game/SnakeGame.py/SnakeGames.py`
- [Collision and score](https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py): `Snake-Game/SnakeGame.py/SnakeGames.py`
- [Audio controls](https://github.com/prateekm180/game-dev/blob/main/Snake-Game/SnakeGame.py/SnakeGames.py): `Snake-Game/SnakeGame.py/SnakeGames.py`

### Other components

- **Player**
- **Pygame runtime**
- **Turtle display**
- **Pygame audio**

## Connections

- Player → Game entry: starts
- Game entry → Screen setup: creates screen
- Game entry → Start screen: shows start
- Player → Start screen: starts game
- Game entry → Game loop: runs loop
- Player → Game loop: flaps
- Game loop → Pipe handling: creates and moves
- Game loop → Score and result: updates score
- Game loop → Turtle display: draws game
- Start screen → Turtle display: draws prompt
- Score and result → Turtle display: shows result
- Player → Game entry: starts
- Game entry → Game controller: runs game
- Player → Game controller: sends input
- Game controller → Menu controls: handles menu
- Game controller → Maze state: loads maze
- Game controller → Character movement: updates characters
- Game controller → Game rules: checks game state
- Game controller → Game display: draws screen
- Game controller → Sound manager: controls audio
- Game display → Pygame runtime: draws with
- Game controller → Pygame runtime: handles events
- Player → Game entry: starts
- Game entry → Menu system: draws menu
- Player → Menu system: selects action
- Menu system → Game loop: starts or resumes
- Player → Game loop: sends controls
- Game loop → Snake movement: moves snake
- Game loop → Food and growth: checks food
- Game loop → Collision and score: checks collisions
- Game loop → Audio controls: plays sounds
- Game loop → Turtle display: updates display
- Menu system → Turtle display: draws menu
- Audio controls → Pygame audio: uses mixer
