I will list the files in the project to understand the structure.
I will read package.json to inspect the available dependencies.
I will install three, @types/three, lucide-react, canvas-confetti, and @types/canvas-confetti.
I will read index.html to see the current page structure and title.
I will generate Ghibli-style artwork for menu backgrounds, banners, and character portraits.
I will generate portrait artwork for characters and the main menu banner.
I will generate character portraits for the game character selection and shop.
I will generate the second character avatar: the Little Witch.
I will generate avatars for the Dragon Prince and Forest Spirit characters.
I will generate the fourth avatar: Forest Tanuki spirit.
I will generate a spirit world train station artwork for game-over and mission screens.
I will update index.html with an appropriate title, favicon, and Google Fonts for the Ghibli anime aesthetic.
I will update src/index.css with custom utility classes, fonts, and animation keyframes suitable for Ghibli-themed UI.
I will create src/game/constants.ts with game configuration, character definitions, board models, missions, and upgrades.
I will create src/game/audio.ts with a procedural Web Audio synthesizer for Ghibli melodies, railway bells, and dynamic game sound effects.
I will create src/game/models.ts with procedural 3D models for characters, chasers, steam trains, obstacles, collectibles, and scenery.
I will edit src/game/models.ts to fix the TypeScript material property and unused variable.
I will remove ropeMat from src/game/models.ts.
I will create src/game/world.ts to manage procedural track chunks, dynamic obstacle spawning, moving trains, item collection, and collision detection.
I will remove the unused isJetpack argument from update in src/game/world.ts.
I will create src/game/GameEngine.ts to manage player physics, character animations, powerup timers, camera, collision resolution, and chaser logic.
I will edit src/game/GameEngine.ts to clean up the unused imports and variables.
I will edit handleCrash in src/game/GameEngine.ts.
I will create src/components/HUD.tsx with live score, power-up timers, coins/acorns counters, and touch control buttons.
I will create src/components/ShopModal.tsx for character selection, glider shop, power-up duration upgrades, and mystery chests.
I will remove the unused Shield import in src/components/ShopModal.tsx.
I will create src/components/MissionsModal.tsx with active missions, rewards claiming, and achievements list.
I will create src/components/GameOverModal.tsx with run stats, highscore celebration, revive option, and double coins multiplier.
I will create src/components/DailyRewardModal.tsx for 7-day login calendar rewards.
I will create src/components/PauseModal.tsx to handle in-game pausing and mission previews.
I will create src/components/SettingsModal.tsx with controls tutorial, audio preferences, and onscreen control toggles.
I will create src/components/MainMenu.tsx with title screen, character/board loadout selector, booster toggles, and modal triggers.
I will create src/components/GameCanvas.tsx to handle Three.js lifecycle, touch swipes, keyboard listeners, and double-tap gestures.
I will create src/App.tsx to connect all game systems, modals, state persistence, audio management, and mission progress.
I will test building the project to verify that there are no compilation or bundling errors.
I have created a fully featured, playable 3D Subway Surfers style game in Studio Ghibli anime aesthetic called Spirited Surfers: The Seaside Railway (千と千尋風 • 風の線路ランナー) using Three.js, React, and Tailwind CSS.
✨ Key Features Implemented:
-
3D Ghibli Anime Railway World (Three.js):
- Endless Procedural Tracks: 3-track coastal railway with wooden sleepers, steel rails, gravel ballast, quaint Torii gates, telegraph poles, sakura blossom trees, and glistening coastal sea water.
- Dynamic Lighting & Cel-Shading: Warm anime sunlight, hemisphere ambient lighting, soft shadows, and vibrant toon-shaded materials.
- Camera System: Dynamic third-person follow camera with speed FOV warping and camera shake on impacts.
-
Obstacles & Rooftop Running:
- Moving Steam Locomotives: Oncoming vintage steam trains with glowing headlamps, smokestacks, and railway horn sound effects.
- Climbable Train Ramps: Stationary trains with sloped ramps that let you run and collect coins on train roofs!
- Low Bamboo Hurdles: Jump over hurdles with timed jump physics or super sneakers.
- High Railway Crossing Gates: Slide/roll underneath high crossing booms with animated flashing red lights.
- Signal Posts & Stone Jizo Statues: Obstacles requiring swift lane changes.
- The Chaser: The Grumpy Spirit Station Master (with red lantern staff) and his bouncy Soot Dog chasing right behind!
-
Physics & Smooth Controls:
- 3 Lanes Navigation: Smooth lane switching with lateral tilt and lean.
- Jump & Roll: Jump physics, Super Jump, double-jump capability, and fast-fall roll cancel (classic Subway Surfers mechanic).
- Controls: Full keyboard support (
A/D/Arrows, W/Up/Space to jump, S/Down to slide, Double Space/B for hoverboard), Touch swipe gestures, double-tap hoverboard activation, and on-screen touch control buttons.
-
Power-ups & Magic:
- Magic Glider / Hoverboards: 5 unique boards (Bamboo Glider, Witch Broom, Spirit Cloud, Sakura Board, Dragon Comet) with crash protection.
- Spirit Bell Magnet: Pulls star candies from all lanes into your path.
- Tengu Spring Shoes: High-flying super jumps that let you leap over entire steam trains.
- Golden Origami Crane (2x Multiplier): Double score multiplier.
- Skyward Cloud Jetpack: Rockets your character into the sky on a cloud path packed with floating star candy coin lines!
Files built: index.html, src/index.css, src/game/constants.ts, src/game/audio.ts, src/game/models.ts, src/game/world.ts, src/game/GameEngine.ts, src/components/HUD.tsx, src/components/ShopModal.tsx, src/components/MissionsModal.tsx, src/components/GameOverModal.tsx, src/components/DailyRewardModal.tsx, src/components/PauseModal.tsx, src/components/SettingsModal.tsx, src/components/MainMenu.tsx, src/components/GameCanvas.tsx, src/App.tsx