# melikeycode/qtgametutorial architecture

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

- Interactive diagram: https://gitdiagram.com/melikeycode/qtgametutorial
- Repository: https://github.com/melikeycode/qtgametutorial

## Overview

This repository is a sequence of C++/Qt game tutorials, not one unified application. The sampled entry points create and show a Game, while tutorial 23 explicitly opens a main menu. The examples progress from graphics and input exercises to shooter/tower-defense games and later hex-board games. The graph highlights those product branches; many implementation files are unsampled, so only documented or indexed relationships are connected.

Main entry points: [`tutorial23/Game.cpp`](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/Game.cpp) (Hex game), [`tutorial14/Game.cpp`](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial14/Game.cpp) (Tower game), [`tutorial23/main.cpp`](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/main.cpp) (Hex entry point), [`tutorial2/main.cpp`](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial2/main.cpp) (Rect entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_graphics["Graphics Tutorials"]
  node_rectdemo["Rect demos<br/>[MyRect.cpp]"]
  node_rectentry["Rect entry point<br/>[main.cpp]"]
end

subgraph group_action["Action Games"]
  node_shooter["Shooter game<br/>[Game.cpp]"]
  node_actionentry["Shooter entry point<br/>[main.cpp]"]
end

subgraph group_tower["Tower Defense"]
  node_towergame["Tower game<br/>[Game.cpp]"]
  node_towers["Tower types<br/>[Tower.cpp]"]
  node_towericons["Build icons"]
  node_towerentry["Tower entry point<br/>[main.cpp]"]
end

subgraph group_hex["Hex Games"]
  node_hexgame["Hex game<br/>[Game.cpp]"]
  node_hexboard["Hex board<br/>[HexBoard.h]"]
  node_hexcell["Hex cell<br/>[Hex.cpp]"]
  node_hexui["Menu button<br/>[Button.cpp]"]
  node_hexentry["Hex entry point<br/>[main.cpp]"]
  node_hexlater["Later hex games<br/>[Game.cpp]"]
  node_hexboardslater["Later board variants<br/>[HexBoard.h]"]
end

node_learner(("Player / learner"))

node_learner -->|"starts"| node_rectentry
node_rectentry -->|"creates"| node_rectdemo
node_learner -->|"starts"| node_actionentry
node_actionentry -->|"creates"| node_shooter
node_learner -->|"starts"| node_towerentry
node_towerentry -->|"creates"| node_towergame
node_towergame -->|"uses"| node_towers
node_towergame -.->|"offers"| node_towericons
node_learner -->|"starts"| node_hexentry
node_hexentry -->|"creates"| node_hexgame
node_hexentry -->|"opens menu"| node_hexgame
node_hexgame -->|"uses"| node_hexboard
node_hexgame -.->|"uses"| node_hexui
node_hexboard -.->|"contains"| node_hexcell
node_hexlater -.->|"uses"| node_hexboardslater

click node_rectdemo "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial2/MyRect.cpp"
click node_shooter "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial6/Game.cpp"
click node_towergame "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial14/Game.cpp"
click node_towers "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial15/Tower.cpp"
click node_towericons "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial15/BuildBrownTowerIcon.cpp"
click node_towerentry "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial14/main.cpp"
click node_hexgame "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/Game.cpp"
click node_hexboard "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/HexBoard.h"
click node_hexcell "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial27/Hex.cpp"
click node_hexui "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/Button.cpp"
click node_hexentry "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/main.cpp"
click node_hexlater "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial34/Game.cpp"
click node_hexboardslater "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial30/HexBoard.h"
click node_actionentry "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial6/main.cpp"
click node_rectentry "https://github.com/melikeycode/qtgametutorial/blob/master/tutorial2/main.cpp"

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_rectdemo,node_rectentry toneBlue
class node_shooter,node_actionentry toneAmber
class node_towergame,node_towers,node_towericons,node_towerentry toneMint
class node_hexgame,node_hexboard,node_hexcell,node_hexui,node_hexentry,node_hexlater,node_hexboardslater toneRose
class node_learner toneIndigo
```

## Components

### Graphics Tutorials

- [Rect demos](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial2/MyRect.cpp): `tutorial2/MyRect.cpp`
- [Rect entry point](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial2/main.cpp): `tutorial2/main.cpp`

### Action Games

- [Shooter game](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial6/Game.cpp): `tutorial6/Game.cpp`
- [Shooter entry point](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial6/main.cpp): `tutorial6/main.cpp`

### Tower Defense

- [Tower game](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial14/Game.cpp): `tutorial14/Game.cpp`
- [Tower types](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial15/Tower.cpp): `tutorial15/Tower.cpp`
- [Build icons](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial15/BuildBrownTowerIcon.cpp): `tutorial15/BuildBrownTowerIcon.cpp`
- [Tower entry point](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial14/main.cpp): `tutorial14/main.cpp`

### Hex Games

- [Hex game](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/Game.cpp): `tutorial23/Game.cpp`
- [Hex board](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/HexBoard.h): `tutorial23/HexBoard.h`
- [Hex cell](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial27/Hex.cpp): `tutorial27/Hex.cpp`
- [Menu button](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/Button.cpp): `tutorial23/Button.cpp`
- [Hex entry point](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial23/main.cpp): `tutorial23/main.cpp`
- [Later hex games](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial34/Game.cpp): `tutorial34/Game.cpp`
- [Later board variants](https://github.com/melikeycode/qtgametutorial/blob/master/tutorial30/HexBoard.h): `tutorial30/HexBoard.h`

### Other components

- **Player / learner**

## Connections

- Player / learner → Rect entry point: starts (evidence: `tutorial2/main.cpp`)
- Rect entry point → Rect demos: creates (evidence: `tutorial2/main.cpp`)
- Player / learner → Shooter entry point: starts (evidence: `tutorial6/main.cpp`)
- Shooter entry point → Shooter game: creates (evidence: `tutorial6/main.cpp`)
- Player / learner → Tower entry point: starts (evidence: `tutorial14/main.cpp`)
- Tower entry point → Tower game: creates (evidence: `tutorial14/main.cpp`)
- Tower game → Tower types: uses
- Tower game → Build icons: offers
- Player / learner → Hex entry point: starts (evidence: `tutorial23/main.cpp`)
- Hex entry point → Hex game: creates (evidence: `tutorial23/main.cpp`)
- Hex entry point → Hex game: opens menu (evidence: `tutorial23/main.cpp`)
- Hex game → Hex board: uses
- Hex game → Menu button: uses
- Hex board → Hex cell: contains
- Later hex games → Later board variants: uses
