# nakul28062007/arcade-village architecture

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

- Interactive diagram: https://gitdiagram.com/nakul28062007/arcade-village
- Repository: https://github.com/nakul28062007/arcade-village

## Overview

#### 1. Repository Purpose
Arcade Village is a static browser project that uses a pixel-art overworld as a launcher for three independent JavaScript mini-games. It has no backend, build pipeline, package manifest, or server requirement; opening `index.html` starts the experience.

Core entry points:
- Overworld: `index.html`, `index.js`, `style.css`
- Dice Game: `games/dice-game/dicee.html`, `games/dice-game/index.js`
- Simon Game: `games/simon-game/index.html`, `games/simon-game/game.js`
- Drum Kit: `games/drum-kit/index.html`, `games/drum-kit/index.js`

#### 2. Overworld Launcher and Navigation
The root page is the application shell. It renders the fixed-size village map and player sprite, receives WASD keyboard input, updates movement/sprite state, and detects whether the player occupies a house trigger zone.

Relevant paths:
- `index.html`
- `index.js`
- `style.css`

On zone entry, the launcher displays an interaction prompt. Pressing Enter performs browser navigation to one of the standalone game HTML documents rather than embedding games or sharing runtime state.

#### 3. Map, Movement, and Collision Boundary
The overworld is a coordinate-driven state machine: player position is constrained by the map’s outer bounds, while hardcoded pixel ranges define three invisible game-launch zones. Sprite presentation switches between idle and running states as movement changes.

Relevant paths:
- `index.js`
- `assets/images`

This is the primary architectural constraint: trigger coordinates are coupled to the exact map artwork and fixed `960x540` layout. There is no obstacle collision for house sprites and no responsive coordinate scaling.

#### 4. Game Routing Boundary
The overworld routes directly through relative document URLs:
- Dice: `games/dice-game/dicee.html`
- Simon: `games/simon-game/index.html`
- Drum Kit: `games/drum-kit/index.html`

Each destination is a separate page/runtime. Navigation resets the launcher context; there is no shared state, shared game API, return flow, or centralized game registry beyond the root launcher’s routing logic.

#### 5. Dice Game
The Dice Game is a self-contained HTML/CSS/JavaScript page that presents dice-roll outcomes, likely driven by client-side randomization and DOM/image updates.

Relevant paths:
- `games/dice-game/dicee.html`
- `games/dice-game/index.js`
- `games/dice-game/images`

Its assets and behavior remain isolated from the overworld, connected only by the navigation URL.

#### 6. Simon Game
Simon is a standalone sequence-memory game. Its JavaScript owns game progression, player-input validation, visual feedback, and sound playback.

Relevant paths:
- `games/simon-game/index.html`
- `games/simon-game/game.js`
- `games/simon-game/sounds`

The sound directory contains color-specific feedback plus an incorrect-input sound, making browser audio playback a material runtime dependency.

#### 7. Drum Kit
The Drum Kit is another isolated interaction page, mapping keyboard and/or on-page drum actions to visual feedback and percussion audio.

Relevant paths:
- `games/drum-kit/index.html`
- `games/drum-kit/index.js`
- `games/drum-kit/sounds`

It uses locally bundled MP3 samples, so it does not depend on an audio API service or backend.

#### 8. Runtime and External Dependencies
All functionality executes in the browser using HTML, CSS, and JavaScript. The launcher uses jQuery for DOM and sprite/state updates; mini-games may retain their own independent DOM event handling. External dependencies are limited to browser-hosted assets and Google Fonts’ Pixelify Sans. Deployment is compatible with static hosting, as demonstrated by GitHub Pages.

Main entry points: [`index.js`](https://github.com/nakul28062007/arcade-village/blob/main/index.js) (Movement and trigger zones), [`index.html`](https://github.com/nakul28062007/arcade-village/blob/main/index.html) (Overworld document), [`games/dice-game/dicee.html`](https://github.com/nakul28062007/arcade-village/blob/main/games/dice-game/dicee.html) (Dice document), [`games/dice-game/index.js`](https://github.com/nakul28062007/arcade-village/blob/main/games/dice-game/index.js) (Dice roll logic)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_overworld["Overworld Launcher"]
  node_overworld_html["Overworld document<br/>HTML entry<br/>[index.html]"]
  node_overworld_style["Village styling<br/>CSS<br/>[style.css]"]
  node_overworld_js["Launcher controller<br/>jQuery JavaScript<br/>[index.js]"]
  node_movement_zones["Movement and trigger zones<br/>coordinate state<br/>[index.js]"]
  node_overworld_images["Map and sprite assets<br/>image assets"]
end

subgraph group_dice["Dice Game"]
  node_dice_html["Dice document<br/>HTML entry<br/>[dicee.html]"]
  node_dice_js["Dice roll logic<br/>JavaScript<br/>[index.js]"]
  node_dice_images["Dice images<br/>image assets"]
end

subgraph group_simon["Simon Game"]
  node_simon_html["Simon document<br/>HTML entry<br/>[index.html]"]
  node_simon_js["Simon controller<br/>JavaScript<br/>[game.js]"]
  node_simon_sounds["Simon sounds<br/>audio assets"]
end

subgraph group_drums["Drum Kit"]
  node_drum_html["Drum document<br/>HTML entry<br/>[index.html]"]
  node_drum_js["Drum interaction logic<br/>JavaScript<br/>[index.js]"]
  node_drum_sounds["Percussion samples<br/>MP3 assets"]
end

node_browser(("Browser<br/>runtime"))
node_google_fonts["Pixelify Sans<br/>external font"]

node_browser -->|"opens"| node_overworld_html
node_overworld_html -->|"loads"| node_overworld_style
node_overworld_html -->|"loads"| node_overworld_js
node_overworld_html -.->|"loads font"| node_google_fonts
node_overworld_js -->|"updates"| node_movement_zones
node_movement_zones -.->|"aligns with"| node_overworld_images
node_movement_zones -->|"Enter navigates"| node_dice_html
node_movement_zones -->|"Enter navigates"| node_simon_html
node_movement_zones -->|"Enter navigates"| node_drum_html
node_dice_html -->|"loads"| node_dice_js
node_dice_js -->|"updates"| node_dice_images
node_simon_html -->|"loads"| node_simon_js
node_simon_js -->|"plays"| node_simon_sounds
node_drum_html -->|"loads"| node_drum_js
node_drum_js -->|"plays"| node_drum_sounds

click node_overworld_html "https://github.com/nakul28062007/arcade-village/blob/main/index.html"
click node_overworld_style "https://github.com/nakul28062007/arcade-village/blob/main/style.css"
click node_overworld_js "https://github.com/nakul28062007/arcade-village/blob/main/index.js"
click node_movement_zones "https://github.com/nakul28062007/arcade-village/blob/main/index.js"
click node_overworld_images "https://github.com/nakul28062007/arcade-village/tree/main/assets/images"
click node_dice_html "https://github.com/nakul28062007/arcade-village/blob/main/games/dice-game/dicee.html"
click node_dice_js "https://github.com/nakul28062007/arcade-village/blob/main/games/dice-game/index.js"
click node_dice_images "https://github.com/nakul28062007/arcade-village/tree/main/games/dice-game/images"
click node_simon_html "https://github.com/nakul28062007/arcade-village/blob/main/games/simon-game/index.html"
click node_simon_js "https://github.com/nakul28062007/arcade-village/blob/main/games/simon-game/game.js"
click node_simon_sounds "https://github.com/nakul28062007/arcade-village/tree/main/games/simon-game/sounds"
click node_drum_html "https://github.com/nakul28062007/arcade-village/blob/main/games/drum-kit/index.html"
click node_drum_js "https://github.com/nakul28062007/arcade-village/blob/main/games/drum-kit/index.js"
click node_drum_sounds "https://github.com/nakul28062007/arcade-village/tree/main/games/drum-kit/sounds"

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_overworld_html,node_overworld_style,node_overworld_js,node_movement_zones,node_overworld_images toneBlue
class node_dice_html,node_dice_js,node_dice_images toneAmber
class node_simon_html,node_simon_js,node_simon_sounds toneMint
class node_drum_html,node_drum_js,node_drum_sounds toneRose
class node_browser,node_google_fonts toneNeutral
```

## Components

### Overworld Launcher

Fixed 960x540 village shell and game routing.

- [Overworld document](https://github.com/nakul28062007/arcade-village/blob/main/index.html): HTML entry · `index.html`
- [Village styling](https://github.com/nakul28062007/arcade-village/blob/main/style.css): CSS · `style.css`
- [Launcher controller](https://github.com/nakul28062007/arcade-village/blob/main/index.js): jQuery JavaScript · Owns keyboard input, player state, prompts, and direct page routing. · `index.js`
- [Movement and trigger zones](https://github.com/nakul28062007/arcade-village/blob/main/index.js): coordinate state · Hardcoded bounds and house zones are coupled to the fixed map artwork. · `index.js`
- [Map and sprite assets](https://github.com/nakul28062007/arcade-village/tree/main/assets/images): image assets · `assets/images`

### Dice Game

Standalone dice-roll page.

- [Dice document](https://github.com/nakul28062007/arcade-village/blob/main/games/dice-game/dicee.html): HTML entry · `games/dice-game/dicee.html`
- [Dice roll logic](https://github.com/nakul28062007/arcade-village/blob/main/games/dice-game/index.js): JavaScript · Randomizes outcomes and updates the page DOM. · `games/dice-game/index.js`
- [Dice images](https://github.com/nakul28062007/arcade-village/tree/main/games/dice-game/images): image assets · `games/dice-game/images`

### Simon Game

Standalone sequence-memory page.

- [Simon document](https://github.com/nakul28062007/arcade-village/blob/main/games/simon-game/index.html): HTML entry · `games/simon-game/index.html`
- [Simon controller](https://github.com/nakul28062007/arcade-village/blob/main/games/simon-game/game.js): JavaScript · Owns sequence progression, input validation, and feedback. · `games/simon-game/game.js`
- [Simon sounds](https://github.com/nakul28062007/arcade-village/tree/main/games/simon-game/sounds): audio assets · Color feedback and incorrect-input audio. · `games/simon-game/sounds`

### Drum Kit

Standalone percussion page.

- [Drum document](https://github.com/nakul28062007/arcade-village/blob/main/games/drum-kit/index.html): HTML entry · `games/drum-kit/index.html`
- [Drum interaction logic](https://github.com/nakul28062007/arcade-village/blob/main/games/drum-kit/index.js): JavaScript · Maps keyboard or on-page actions to visual and audio feedback. · `games/drum-kit/index.js`
- [Percussion samples](https://github.com/nakul28062007/arcade-village/tree/main/games/drum-kit/sounds): MP3 assets · `games/drum-kit/sounds`

### Other components

- **Browser**: runtime · Runs every page as an independent client-side runtime.
- **Pixelify Sans**: external font

## Connections

- Browser → Overworld document: opens
- Overworld document → Village styling: loads
- Overworld document → Launcher controller: loads
- Overworld document → Pixelify Sans: loads font
- Launcher controller → Movement and trigger zones: updates
- Movement and trigger zones → Map and sprite assets: aligns with
- Movement and trigger zones → Dice document: Enter navigates
- Movement and trigger zones → Simon document: Enter navigates
- Movement and trigger zones → Drum document: Enter navigates
- Dice document → Dice roll logic: loads
- Dice roll logic → Dice images: updates
- Simon document → Simon controller: loads
- Simon controller → Simon sounds: plays
- Drum document → Drum interaction logic: loads
- Drum interaction logic → Percussion samples: plays
