# alexmyczko/bubbros architecture

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

- Interactive diagram: https://gitdiagram.com/alexmyczko/bubbros
- Repository: https://github.com/alexmyczko/bubbros

## Overview

Bub n Bros is a networked multiplayer bubble-action game. The documented path is to launch the browser interface, start a server and choose levels, then join with a client; local discovery and Internet listings support finding games. The graph preserves game simulation, level and ranking capabilities, protocol/client rendering, and metaserver discovery. Some subsystems are represented by their exact tree directories because their implementation was not sampled; edges are limited to documented or excerpt-supported relationships.

Main entry points: [`bubbob/boards.py`](https://github.com/alexmyczko/bubbros/blob/main/bubbob/boards.py) (Board simulation), [`display/Client.py`](https://github.com/alexmyczko/bubbros/blob/main/display/Client.py) (Client entry), [`http2/httppages.py`](https://github.com/alexmyczko/bubbros/blob/main/http2/httppages.py) (Game web pages), [`bubbob/player.py`](https://github.com/alexmyczko/bubbros/blob/main/bubbob/player.py) (Players)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Game access"]
  node_web_launcher["Browser launcher<br/>[BubBob.py]"]
  node_web_pages["Game web pages<br/>[httppages.py]"]
end

subgraph group_simulation["Game simulation"]
  node_player["Players<br/>[player.py]"]
  node_boards["Board simulation<br/>[boards.py]"]
  node_bubbles["Bubbles<br/>[bubbles.py]"]
  node_monsters["Monsters<br/>[monsters.py]"]
  node_bonuses["Bonuses<br/>[bonuses.py]"]
  node_images["Sprites and images<br/>[images.py]"]
  node_monster_maps["Game content maps<br/>[mnstrmap.py]"]
  node_levels["Level definitions"]
  node_extensions["Game extensions<br/>[__init__.py]"]
  node_timeline["Timeline<br/>[timeline.py]"]
  node_ranking["Ranking<br/>[ranking.py]"]
end

subgraph group_network["Networking and discovery"]
  node_game_server["Game server<br/>[bb.py]"]
  node_game_protocol["Game protocol<br/>[gamesrv.py]"]
  node_message_format["Message format<br/>[msgstruct.py]"]
  node_host_discovery["Local discovery<br/>[hostchooser.py]"]
  node_meta_client["Internet game listings<br/>[metaclient.py]"]
  node_meta_server["Metaserver<br/>[metaserver.py]"]
end

subgraph group_client["Client experience"]
  node_client_entry["Client entry<br/>[Client.py]"]
  node_playfield_client["Playfield client<br/>[pclient.py]"]
  node_display_modes["Display modes<br/>[modes.py]"]
end

node_player_actor(("Player"))
node_browser_actor(("Browser user"))

node_browser_actor -->|"launches"| node_web_launcher
node_web_launcher -->|"opens pages"| node_web_pages
node_browser_actor -->|"starts game"| node_web_pages
node_web_pages -->|"starts server"| node_game_server
node_player_actor -->|"joins game"| node_client_entry
node_client_entry -->|"starts client"| node_playfield_client
node_client_entry -->|"finds hosts"| node_host_discovery
node_client_entry -->|"lists Internet games"| node_meta_client
node_playfield_client -->|"exchanges game data"| node_game_protocol
node_playfield_client -->|"uses display modes"| node_display_modes
node_game_protocol -->|"encodes messages"| node_message_format
node_game_protocol -.->|"dispatches player input"| node_player
node_boards -->|"updates players"| node_player
node_player -->|"creates bubbles"| node_bubbles
node_boards -.->|"runs monster simulation"| node_monsters
node_boards -->|"starts bonus play"| node_bonuses
node_monsters -->|"uses monster bonuses"| node_bonuses
node_player -->|"records inputs"| node_timeline
node_boards -->|"builds results"| node_ranking
node_boards -.->|"loads levels"| node_levels
node_boards -->|"uses sprites"| node_images
node_images -->|"loads sprite maps"| node_monster_maps
node_extensions -.->|"extends game"| node_boards
node_meta_client -.->|"registers games"| node_meta_server
node_web_pages -->|"queries listings"| node_meta_client

click node_player "https://github.com/alexmyczko/bubbros/blob/main/bubbob/player.py"
click node_boards "https://github.com/alexmyczko/bubbros/blob/main/bubbob/boards.py"
click node_bubbles "https://github.com/alexmyczko/bubbros/blob/main/bubbob/bubbles.py"
click node_monsters "https://github.com/alexmyczko/bubbros/blob/main/bubbob/monsters.py"
click node_bonuses "https://github.com/alexmyczko/bubbros/blob/main/bubbob/bonuses.py"
click node_images "https://github.com/alexmyczko/bubbros/blob/main/bubbob/images.py"
click node_monster_maps "https://github.com/alexmyczko/bubbros/blob/main/bubbob/mnstrmap.py"
click node_levels "https://github.com/alexmyczko/bubbros/tree/main/bubbob/levels"
click node_extensions "https://github.com/alexmyczko/bubbros/blob/main/bubbob/ext1/__init__.py"
click node_timeline "https://github.com/alexmyczko/bubbros/blob/main/bubbob/timeline.py"
click node_ranking "https://github.com/alexmyczko/bubbros/blob/main/bubbob/ranking.py"
click node_web_launcher "https://github.com/alexmyczko/bubbros/blob/main/BubBob.py"
click node_web_pages "https://github.com/alexmyczko/bubbros/blob/main/http2/httppages.py"
click node_game_server "https://github.com/alexmyczko/bubbros/blob/main/bubbob/bb.py"
click node_game_protocol "https://github.com/alexmyczko/bubbros/blob/main/common/gamesrv.py"
click node_message_format "https://github.com/alexmyczko/bubbros/blob/main/common/msgstruct.py"
click node_host_discovery "https://github.com/alexmyczko/bubbros/blob/main/common/hostchooser.py"
click node_meta_client "https://github.com/alexmyczko/bubbros/blob/main/metaserver/metaclient.py"
click node_meta_server "https://github.com/alexmyczko/bubbros/blob/main/metaserver/metaserver.py"
click node_client_entry "https://github.com/alexmyczko/bubbros/blob/main/display/Client.py"
click node_playfield_client "https://github.com/alexmyczko/bubbros/blob/main/display/pclient.py"
click node_display_modes "https://github.com/alexmyczko/bubbros/blob/main/display/modes.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_web_launcher,node_web_pages,node_browser_actor toneBlue
class node_player,node_boards,node_bubbles,node_monsters,node_bonuses,node_images,node_monster_maps,node_levels,node_extensions,node_timeline,node_ranking toneAmber
class node_game_server,node_game_protocol,node_message_format,node_host_discovery,node_meta_client,node_meta_server toneMint
class node_client_entry,node_playfield_client,node_display_modes toneRose
class node_player_actor toneIndigo
```

## Components

### Game access

- [Browser launcher](https://github.com/alexmyczko/bubbros/blob/main/BubBob.py): `BubBob.py`
- [Game web pages](https://github.com/alexmyczko/bubbros/blob/main/http2/httppages.py): `http2/httppages.py`

### Game simulation

- [Players](https://github.com/alexmyczko/bubbros/blob/main/bubbob/player.py): `bubbob/player.py`
- [Board simulation](https://github.com/alexmyczko/bubbros/blob/main/bubbob/boards.py): `bubbob/boards.py`
- [Bubbles](https://github.com/alexmyczko/bubbros/blob/main/bubbob/bubbles.py): `bubbob/bubbles.py`
- [Monsters](https://github.com/alexmyczko/bubbros/blob/main/bubbob/monsters.py): `bubbob/monsters.py`
- [Bonuses](https://github.com/alexmyczko/bubbros/blob/main/bubbob/bonuses.py): `bubbob/bonuses.py`
- [Sprites and images](https://github.com/alexmyczko/bubbros/blob/main/bubbob/images.py): `bubbob/images.py`
- [Game content maps](https://github.com/alexmyczko/bubbros/blob/main/bubbob/mnstrmap.py): `bubbob/mnstrmap.py`
- [Level definitions](https://github.com/alexmyczko/bubbros/tree/main/bubbob/levels): `bubbob/levels`
- [Game extensions](https://github.com/alexmyczko/bubbros/blob/main/bubbob/ext1/__init__.py): `bubbob/ext1/__init__.py`
- [Timeline](https://github.com/alexmyczko/bubbros/blob/main/bubbob/timeline.py): `bubbob/timeline.py`
- [Ranking](https://github.com/alexmyczko/bubbros/blob/main/bubbob/ranking.py): `bubbob/ranking.py`

### Networking and discovery

- [Game server](https://github.com/alexmyczko/bubbros/blob/main/bubbob/bb.py): `bubbob/bb.py`
- [Game protocol](https://github.com/alexmyczko/bubbros/blob/main/common/gamesrv.py): `common/gamesrv.py`
- [Message format](https://github.com/alexmyczko/bubbros/blob/main/common/msgstruct.py): `common/msgstruct.py`
- [Local discovery](https://github.com/alexmyczko/bubbros/blob/main/common/hostchooser.py): `common/hostchooser.py`
- [Internet game listings](https://github.com/alexmyczko/bubbros/blob/main/metaserver/metaclient.py): `metaserver/metaclient.py`
- [Metaserver](https://github.com/alexmyczko/bubbros/blob/main/metaserver/metaserver.py): `metaserver/metaserver.py`

### Client experience

- [Client entry](https://github.com/alexmyczko/bubbros/blob/main/display/Client.py): `display/Client.py`
- [Playfield client](https://github.com/alexmyczko/bubbros/blob/main/display/pclient.py): `display/pclient.py`
- [Display modes](https://github.com/alexmyczko/bubbros/blob/main/display/modes.py): `display/modes.py`

### Other components

- **Player**
- **Browser user**

## Connections

- Browser user → Browser launcher: launches
- Browser launcher → Game web pages: opens pages (evidence: `BubBob.py`)
- Browser user → Game web pages: starts game
- Game web pages → Game server: starts server (evidence: `http2/httppages.py`)
- Player → Client entry: joins game
- Client entry → Playfield client: starts client (evidence: `display/Client.py`)
- Client entry → Local discovery: finds hosts (evidence: `display/Client.py`)
- Client entry → Internet game listings: lists Internet games (evidence: `display/Client.py`)
- Playfield client → Game protocol: exchanges game data (evidence: `display/pclient.py`)
- Playfield client → Display modes: uses display modes (evidence: `display/pclient.py`)
- Game protocol → Message format: encodes messages (evidence: `common/gamesrv.py`)
- Game protocol → Players: dispatches player input (evidence: `bubbob/player.py`)
- Board simulation → Players: updates players (evidence: `bubbob/boards.py`)
- Players → Bubbles: creates bubbles (evidence: `bubbob/player.py`)
- Board simulation → Monsters: runs monster simulation (evidence: `bubbob/boards.py`)
- Board simulation → Bonuses: starts bonus play (evidence: `bubbob/boards.py`)
- Monsters → Bonuses: uses monster bonuses (evidence: `bubbob/monsters.py`)
- Players → Timeline: records inputs (evidence: `bubbob/player.py`)
- Board simulation → Ranking: builds results (evidence: `bubbob/boards.py`)
- Board simulation → Level definitions: loads levels
- Board simulation → Sprites and images: uses sprites (evidence: `bubbob/boards.py`)
- Sprites and images → Game content maps: loads sprite maps (evidence: `bubbob/images.py`)
- Game extensions → Board simulation: extends game (evidence: `bubbob/ext1/__init__.py`)
- Internet game listings → Metaserver: registers games
- Game web pages → Internet game listings: queries listings (evidence: `http2/httppages.py`)
