Arcane Tycoon — Heroes & Magic theme park tycoon game

Complete browser game inspired by OpenRCT2 with fantasy twist:
- Custom roller coaster designer with physics-based ratings + on-ride POV
- 10 animated rides, 7 shops, 16 scenery items, path network & guest AI
- Heroes guild vs monster invasions (5 classes, XP/gear/bosses)
- Magic spell system (8 spells), research tree, economy/marketing/loans
- Day-night cycle, weather, park rating, awards, 4 scenarios
- Save/load slots + autosave, procedural WebAudio SFX/music
- Isometric canvas renderer, minimap, diagnostics overlay
- Test suites: smoke(13), linkcheck, inputcheck, framecheck, rendercheck, flow
This commit is contained in:
2026-08-23 06:59:21 +00:00
commit ac00687480
30 changed files with 6772 additions and 0 deletions
+94
View File
@@ -0,0 +1,94 @@
# ✦ Arcane Tycoon — Heroes & Magic Theme Park
A complete, publish-ready **browser theme-park tycoon game** inspired by the classic
RollerCoaster Tycoon / OpenRCT2 formula — supercharged with **heroes, monsters and magic**.
100% vanilla JavaScript + Canvas, zero dependencies, no build step.
**▶ Play: http://127.0.0.1:8020**
---
## Features
### 🎢 Park Building (the RCT heart)
- Isometric canvas world (up to 64×64 tiles), pan / zoom / minimap
- **Path network** with guest pathfinding (BFS), pavement & cobblestone
- **10 prebuilt rides** — Unicorn Carousel, Sky Wheel, Gravity Spire drop tower,
Fairy Swings, Haunted Crypt, River Sprite Flume, Dragonling Coaster,
Portal Blasters, Broomstick Tower… all procedurally animated
- **7 shops** with stock, pricing and needs-driven demand (food / drink / toilets!)
- **16 scenery items** with beauty auras, lighting and mana properties
- Terrain painting (grass / sand / rock / water) and bulldozer with refunds
### 🎢 Custom Coaster Designer
- Place a station next to a path, then lay pieces: straights, curves, slopes,
steep drops and **loops** — chain lifts are automatic
- Real-ish physics: energy conservation with friction → max speed, airtime,
drops, inversions feed **Excitement / Intensity / Nausea ratings**
- Track must form a closed circuit back to the station; live stats while building
- **On-ride POV camera**: ride your own coaster first-person with speed lines, loops & day/night skies
### 🧑‍🤝‍🧑 Guest Simulation
- Individual guests with name, cash, thrill-preference, color
- Needs AI: hunger, thirst, bladder, energy → they seek shops, benches, rides & exits
- Thought bubbles, happiness dynamics, littering & vomit, fleeing from monsters
### 🧑‍💼 Staff
Handymen (clean), Mechanics (repair breakdowns), Guards (deter vandalism),
Court Jesters (entertain queues). Monthly wages & ride running costs.
### ⚔️ Heroes & Monster Invasions
- Build the **Heroes Guild**, recruit Knights, Rangers, Battle Mages, Clerics, Paladins
- Monsters (slimes, goblins, dire wolves, troll brutes, Void Wraith bosses) invade
on a schedule; heroes auto-engage with melee/ranged/AoE/healer roles
- XP, level-ups, gear tiers, revive timers, loot gold, damage numbers
### ✨ Magic System
- Mana pool that grows with Ley Pools, Rune Stones & Glowcap scenery
- 8 spells: Sunburst, Joy Aura, Healing Light, Fortune Rain, Artificer's Haste
(instant half-price building), Monster Bane, Warding Sigil, Transmutation
### 🔬 Progression & Economy
- Research lab: spend RP across 4 tracks to unlock rides, shops, spells, hero classes
- Full finance: monthly close, wages, loans & interest, marketing campaigns
- Park rating (0999) from rides/happiness/cleanliness/beauty/facilities/safety
- Quarterly awards, objectives per scenario, win/lose flow
### 🌦️ World
Day/night cycle with lamp glows · weather (sunny/cloudy/rain/storm) affecting
attendance & mood · procedural WebAudio SFX + generative ambient music.
### 💾 Quality of life
3 save slots + monthly autosave (localStorage), JSON export/import,
pause & 3 speeds, keyboard shortcuts, tooltips, tutorial/help dialog.
## Scenarios
| Scenario | Difficulty | Hook |
|---|---|---|
| Enchanted Meadows | Easy | Learn the ropes by a sleepy lake |
| Dragonspine Pass | Medium | Rocky pass, early & frequent invasions |
| Void Rift Crisis | Hard | Boss wraiths, aggressive schedule |
| Sandbox Kingdom | Sandbox | $1M, everything unlocked |
## Run it
Any static file server works:
```bash
cd rollercoaster
python3 -m http.server 8020
# open http://127.0.0.1:8020
```
Or run the headless test-suite (no browser needed):
```bash
node tests/smoke.mjs # 13 integration tests over the full simulation
```
## Tech notes
- Pure ES modules, Canvas 2D, WebAudio — no frameworks, no assets, ~6k LOC
- Deterministic seeded map generation (Mulberry32), serializable RNG
- Fixed-timestep simulation decoupled from rendering; entity caps keep 60 fps
*Inspired by Chris Sawyer's classic & the OpenRCT2 project. All code original.*