# π Dragon City Clone
**Build habitats. Breed hybrid dragons. Win elemental battles.**
An idle city-builder / dragon-collector inspired by Dragon City, built from scratch with **Godot 4.7**.
[](https://godotengine.org)
[](scripts/)
[](LICENSE)
[](https://github.com/escalopa/dragon-city/actions/workflows/deploy.yml)
[](#-web-build--deployment)

## β¨ Features
- ποΈ **Isometric archipelago** β a 22Γ22 home island plus two more islands you unlock with gold, all wrapped in ocean, with drag-to-pan and wheel-zoom camera
- π₯ **8 elements** β Terra, Flame, Sea, Nature, Electric, Ice, Metal and Dark, each with its own themed habitat (lava pools, ponds, crystal spiresβ¦) and income rate
- π₯ **Breeding & hatching** β pair two level-4+ dragons at the Breeding Mountain for hybrid eggs (Terra + Flame = **Terrapyro Dragon**), then hatch them in the Hatchery
- π **Feeding & growth** β farms grow food on real-time timers; 4 feeds = 1 level; dragons evolve through 3 growth stages
- βοΈ **Animated 3v3 battles** β turn-based arena combat with lunge and projectile animations, floating damage numbers, hit-flash and faint effects, plus a full elemental type chart (*"It's super effective!"*)
- π° **Idle economy** β habitats keep earning gold while the game is closed; automatic JSON saves
- π¨ **Procedural placeholder art** β every sprite is generated by [`tools/artgen.py`](tools/artgen.py); dragons are grayscale bodies (with flapping wings) tinted per element at runtime
## πΈ Screenshots
| Your island | Battle arena | Breeding |
|:---:|:---:|:---:|
|  |  |  |
## π Development stages
Every stage of the project is recorded as a playable demo, stacked here to show the progress.
### Stage 1 β core loop
Habitats, farms, breeding, hatching, feeding and turn-based battles on a single island, with the first generation of procedural art.

### Stage 2 β visual overhaul & archipelago
Second-generation art (themed habitats, winged animated dragons, decorative props), a three-island archipelago with cloud-covered purchasable islands, and fully animated battles (projectiles, damage popups, faints).

## π Run it
1. Install [Godot 4.7+](https://godotengine.org/download)
2. Open the project (`project.godot`) and press **F5**
| Action | Control |
|---|---|
| Build | Shop β pick item β click the island (right-click cancels) |
| Pan / zoom | Drag / mouse wheel |
| Interact | Click any placed building (or a cloud-covered island to buy it) |
| Menus | Shop Β· Dragons Β· Battle! (bottom-right) |
## π Web build & deployment
The included `Web` export preset (single-threaded, GL Compatibility renderer) exports to `build/web/` and runs on any static host β no special headers required.
**Deployment is fully automated, with no tokens or secrets.** On every push to
`main`, the [`Build Web`](.github/workflows/deploy.yml) GitHub Actions workflow
exports the Godot web build headlessly (Godot 4.7, cached between runs), uploads
it as a workflow artifact, and force-pushes the built site to the **`deploy`**
branch. Vercel's GitHub integration has its production branch set to `deploy`,
so the live site refreshes automatically a few seconds later.
Manual fallback (local export + deploy from your machine):
```bash
bash deploy.sh # push to GitHub + deploy build/web to Vercel
```
## ποΈ Project layout
```
scenes/main.tscn one-node bootstrap scene β the world & UI are built in code
scripts/ GameState + Data autoloads, iso-grid math, camera, map nodes
scripts/ui/ all panels & HUD (UiPanel base class, no .tscn UI)
assets/ generated sprites
tools/artgen.py regenerate all art (python3 + Pillow)
```
## π License
[MIT](LICENSE) β art is generated, no third-party assets. Dragon City is a trademark of Socialpoint; this is an unaffiliated fan-made learning project.
---
Built in a
Claude Cowork session β code, art, demo recording and this README included.