# πŸ‰ 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**. [![Godot](https://img.shields.io/badge/Godot-4.7-478cbf?logo=godotengine&logoColor=white)](https://godotengine.org) [![GDScript](https://img.shields.io/badge/GDScript-100%25-355570)](scripts/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](LICENSE) [![Build Web](https://github.com/escalopa/dragon-city/actions/workflows/deploy.yml/badge.svg)](https://github.com/escalopa/dragon-city/actions/workflows/deploy.yml) [![Plays in browser](https://img.shields.io/badge/Web-playable-2ea44f?logo=googlechrome&logoColor=white)](#-web-build--deployment) ![Gameplay demo](docs/demo-v2.gif)
## ✨ 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 | |:---:|:---:|:---:| | ![Town](docs/screenshots/town.jpg) | ![Battle](docs/screenshots/battle.jpg) | ![Breeding](docs/screenshots/breeding.jpg) | ## πŸ“ˆ 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 1 demo](docs/demo.gif) ### 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). ![Stage 2 demo](docs/demo-v2.gif) ## πŸš€ 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.