# freemany/gamedoh architecture

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

- Interactive diagram: https://gitdiagram.com/freemany/gamedoh
- Repository: https://github.com/freemany/gamedoh

## Overview

gamedoh is a collection of browser-based Canvas games built around a lightweight JavaScript game engine. A player opens a game in a browser; its entry point sets up game logic and entities, then starts play. The repository also provides a starter kit for creating games and documents an external community showcase for playing, downloading, and uploading them. The graph emphasizes documented capabilities and indexed module references; most game implementations were not excerpted, so their internal runtime interactions are not mapped.

Main entry points: [`games/bomberman/main.js`](https://github.com/freemany/gamedoh/blob/main/games/bomberman/main.js) (Bomberman entry), [`games/breakout/main.js`](https://github.com/freemany/gamedoh/blob/main/games/breakout/main.js) (Breakout entry), [`games/super-mario/game.js`](https://github.com/freemany/gamedoh/blob/main/games/super-mario/game.js) (Mario logic), [`games/starter-kit/main.js`](https://github.com/freemany/gamedoh/blob/main/games/starter-kit/main.js) (Starter kit)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_engine["Game engine"]
  node_engine["Canvas game engine<br/>[Game.js]"]
  node_engine_audio["Sound manager<br/>[SoundManager.js]"]
end

subgraph group_arcade["Arcade games"]
  node_breakout_entry["Breakout entry<br/>[main.js]"]
  node_breakout_ball["Ball mechanics<br/>[ball.js]"]
  node_breakout_game["Breakout logic<br/>[game.js]"]
  node_galaga_game["Galaga logic<br/>[game.js]"]
  node_dino_obstacle["Dino obstacles<br/>[obstacle.js]"]
  node_dino_trex["Dino player<br/>[tRex.js]"]
  node_race_player["Race player car<br/>[playerCar.js]"]
  node_space_game["Space Invaders logic<br/>[game.js]"]
end

subgraph group_action["Action games"]
  node_bomber_entry["Bomberman entry<br/>[main.js]"]
  node_bomber_game["Bomberman logic<br/>[game.js]"]
  node_bomber_bomb["Bomb mechanics<br/>[bomb.js]"]
  node_bomber_enemy["Enemy visuals<br/>[images.js]"]
  node_contra_game["Contra logic<br/>[game.js]"]
end

subgraph group_platform["Platform games"]
  node_doodle_game["Doodle Jump logic<br/>[game.js]"]
  node_mario_game["Mario logic<br/>[game.js]"]
  node_mario_tilemap["Mario tilemap<br/>[tilemap.js]"]
end

subgraph group_creation["Game creation"]
  node_starter["Starter kit<br/>[main.js]"]
  node_showcase["Community showcase"]
end

node_player(("Player"))

node_player -->|"starts from"| node_starter
node_starter -.->|"uses framework"| node_engine
node_player -->|"plays"| node_bomber_entry
node_player -->|"plays"| node_breakout_entry
node_bomber_entry -->|"imports"| node_bomber_game
node_bomber_entry -->|"sets up entities"| node_bomber_bomb
node_bomber_entry -.->|"sets up entities"| node_bomber_enemy
node_player -->|"plays"| node_breakout_entry
node_breakout_entry -->|"imports"| node_breakout_game
node_breakout_entry -->|"sets up entities"| node_breakout_ball
node_player -->|"browses or downloads"| node_showcase
node_showcase -->|"runs games"| node_player
node_player -->|"plays"| node_contra_game
node_player -->|"plays"| node_doodle_game
node_player -->|"plays"| node_galaga_game
node_player -->|"plays"| node_dino_obstacle
node_player -->|"plays"| node_dino_trex
node_player -->|"plays"| node_race_player
node_player -->|"plays"| node_space_game
node_player -->|"plays"| node_mario_game
node_mario_game -->|"uses map"| node_mario_tilemap

click node_engine "https://github.com/freemany/gamedoh/blob/main/gamedoh-engine/v1/Game.js"
click node_engine_audio "https://github.com/freemany/gamedoh/blob/main/gamedoh-engine/v1/SoundManager.js"
click node_starter "https://github.com/freemany/gamedoh/blob/main/games/starter-kit/main.js"
click node_bomber_entry "https://github.com/freemany/gamedoh/blob/main/games/bomberman/main.js"
click node_bomber_game "https://github.com/freemany/gamedoh/blob/main/games/bomberman/game.js"
click node_bomber_bomb "https://github.com/freemany/gamedoh/blob/main/games/bomberman/bomb.js"
click node_bomber_enemy "https://github.com/freemany/gamedoh/blob/main/games/bomberman/enemy/images.js"
click node_breakout_entry "https://github.com/freemany/gamedoh/blob/main/games/breakout/main.js"
click node_breakout_ball "https://github.com/freemany/gamedoh/blob/main/games/breakout/ball.js"
click node_breakout_game "https://github.com/freemany/gamedoh/blob/main/games/breakout/game.js"
click node_contra_game "https://github.com/freemany/gamedoh/blob/main/games/contra/game.js"
click node_doodle_game "https://github.com/freemany/gamedoh/blob/main/games/doodle-jump/game.js"
click node_galaga_game "https://github.com/freemany/gamedoh/blob/main/games/galaga/game.js"
click node_dino_obstacle "https://github.com/freemany/gamedoh/blob/main/games/offline-dino/obstacle.js"
click node_dino_trex "https://github.com/freemany/gamedoh/blob/main/games/offline-dino/tRex.js"
click node_race_player "https://github.com/freemany/gamedoh/blob/main/games/race-car/playerCar.js"
click node_space_game "https://github.com/freemany/gamedoh/blob/main/games/spaceinvaders/game.js"
click node_mario_game "https://github.com/freemany/gamedoh/blob/main/games/super-mario/game.js"
click node_mario_tilemap "https://github.com/freemany/gamedoh/blob/main/games/super-mario/tilemap.js"

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_engine,node_engine_audio toneBlue
class node_breakout_entry,node_breakout_ball,node_breakout_game,node_galaga_game,node_dino_obstacle,node_dino_trex,node_race_player,node_space_game toneAmber
class node_bomber_entry,node_bomber_game,node_bomber_bomb,node_bomber_enemy,node_contra_game toneMint
class node_doodle_game,node_mario_game,node_mario_tilemap toneRose
class node_starter,node_showcase,node_player toneIndigo
```

## Components

### Game engine

- [Canvas game engine](https://github.com/freemany/gamedoh/blob/main/gamedoh-engine/v1/Game.js): `gamedoh-engine/v1/Game.js`
- [Sound manager](https://github.com/freemany/gamedoh/blob/main/gamedoh-engine/v1/SoundManager.js): `gamedoh-engine/v1/SoundManager.js`

### Arcade games

- [Breakout entry](https://github.com/freemany/gamedoh/blob/main/games/breakout/main.js): `games/breakout/main.js`
- [Ball mechanics](https://github.com/freemany/gamedoh/blob/main/games/breakout/ball.js): `games/breakout/ball.js`
- [Breakout logic](https://github.com/freemany/gamedoh/blob/main/games/breakout/game.js): `games/breakout/game.js`
- [Galaga logic](https://github.com/freemany/gamedoh/blob/main/games/galaga/game.js): `games/galaga/game.js`
- [Dino obstacles](https://github.com/freemany/gamedoh/blob/main/games/offline-dino/obstacle.js): `games/offline-dino/obstacle.js`
- [Dino player](https://github.com/freemany/gamedoh/blob/main/games/offline-dino/tRex.js): `games/offline-dino/tRex.js`
- [Race player car](https://github.com/freemany/gamedoh/blob/main/games/race-car/playerCar.js): `games/race-car/playerCar.js`
- [Space Invaders logic](https://github.com/freemany/gamedoh/blob/main/games/spaceinvaders/game.js): `games/spaceinvaders/game.js`

### Action games

- [Bomberman entry](https://github.com/freemany/gamedoh/blob/main/games/bomberman/main.js): `games/bomberman/main.js`
- [Bomberman logic](https://github.com/freemany/gamedoh/blob/main/games/bomberman/game.js): `games/bomberman/game.js`
- [Bomb mechanics](https://github.com/freemany/gamedoh/blob/main/games/bomberman/bomb.js): `games/bomberman/bomb.js`
- [Enemy visuals](https://github.com/freemany/gamedoh/blob/main/games/bomberman/enemy/images.js): `games/bomberman/enemy/images.js`
- [Contra logic](https://github.com/freemany/gamedoh/blob/main/games/contra/game.js): `games/contra/game.js`

### Platform games

- [Doodle Jump logic](https://github.com/freemany/gamedoh/blob/main/games/doodle-jump/game.js): `games/doodle-jump/game.js`
- [Mario logic](https://github.com/freemany/gamedoh/blob/main/games/super-mario/game.js): `games/super-mario/game.js`
- [Mario tilemap](https://github.com/freemany/gamedoh/blob/main/games/super-mario/tilemap.js): `games/super-mario/tilemap.js`

### Game creation

- [Starter kit](https://github.com/freemany/gamedoh/blob/main/games/starter-kit/main.js): `games/starter-kit/main.js`
- **Community showcase**

### Other components

- **Player**

## Connections

- Player → Starter kit: starts from (evidence: `README.md`)
- Starter kit → Canvas game engine: uses framework (evidence: `README.md`)
- Player → Bomberman entry: plays (evidence: `README.md`)
- Player → Breakout entry: plays (evidence: `README.md`)
- Bomberman entry → Bomberman logic: imports (evidence: `games/bomberman/main.js`)
- Bomberman entry → Bomb mechanics: sets up entities (evidence: `games/bomberman/main.js`)
- Bomberman entry → Enemy visuals: sets up entities
- Player → Breakout entry: plays (evidence: `README.md`)
- Breakout entry → Breakout logic: imports (evidence: `games/breakout/main.js`)
- Breakout entry → Ball mechanics: sets up entities (evidence: `games/breakout/main.js`)
- Player → Community showcase: browses or downloads (evidence: `README.md`)
- Community showcase → Player: runs games (evidence: `README.md`)
- Player → Contra logic: plays (evidence: `README.md`)
- Player → Doodle Jump logic: plays (evidence: `README.md`)
- Player → Galaga logic: plays (evidence: `README.md`)
- Player → Dino obstacles: plays (evidence: `README.md`)
- Player → Dino player: plays (evidence: `README.md`)
- Player → Race player car: plays (evidence: `README.md`)
- Player → Space Invaders logic: plays (evidence: `README.md`)
- Player → Mario logic: plays (evidence: `README.md`)
- Mario logic → Mario tilemap: uses map (evidence: `games/super-mario/main.js`)
