# ✦ 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 (0–999) 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.*