Skip to content
TheChatArchiveThe Chat Archive
Geminigemini-3.1-pro-preview· GoogleHugging Face Arena WebDev Preferences (2026)

You are an expert 3D web game and assets developer. Create a clone game of Temple Run.

  1. User

    You are an expert 3D web game and assets developer. Create a clone game of Temple Run.

  2. Gemini Assistant

    I will read package.json to inspect the installed dependencies and project structure.

    I will now install three, @types/three, @react-three/fiber, @react-three/drei, lucide-react, and canvas-confetti so we can build a high-performance 3D Temple Run clone with rich 3D graphics, procedural jungle temple environments, shaders, and animations.

    I will install three, @types/three, @react-three/fiber, @react-three/drei, lucide-react, and canvas-confetti.

    I will list the files in the src directory to see the project structure.

    I will read index.html to inspect its contents and title.

    I will read src/index.css to inspect the styles and font configuration.

    I will update index.html to set the title to "Temple Run 3D: Relic Escape", include adventurous Google Fonts (Cinzel Decorative, Rajdhani, and Cinzel), and add appropriate meta tags for mobile/desktop play.

    I will update src/index.css to define font utilities for Cinzel Decorative, Cinzel, and Rajdhani, along with keyframes for glowing gold effects, pulse animations, and UI overlays.

    I will create src/types/game.ts containing the TypeScript definitions for game state, segments, obstacles, power-ups, characters, themes, shop upgrades, and achievements.

    I will create src/utils/soundManager.ts using the browser's native Web Audio API to procedurally generate tribal jungle drum background music, coin chimes, jump/slide swooshes, demon beast roars, and power-up fanfare sounds.

    I will create src/utils/storage.ts to manage localStorage persistence for high scores, coins, shop upgrades, characters, themes, and achievements, as well as define the character and theme configurations.

    I will create src/utils/generator.ts to procedurally generate endless temple path segments, stone corners, obstacles, coin trails, red gems, and power-up collectibles.

    I will create src/components/3d/RunnerCharacter.tsx containing the procedural 3D character model with animated limbs, customizable skins, running, jumping, sliding, and stumbling animations.

    I will create src/components/3d/DemonBeast.tsx to render the Shadow Demon Beast with glowing red eyes, dark fur, claws, and dynamic chasing animations.

    I will create src/components/3d/Collectibles3D.tsx to render rotating gold coins, red gems, and power-ups (magnet, shield, boost) with glowing halos and floating animations.

    I will update src/components/3d/Collectibles3D.tsx to remove the unused label variable and clean up the component.

    I will create src/components/3d/TempleSegment3D.tsx to render the ancient stone temple floors, side guardrails, jungle trees, torches with glowing fire flames, turn corners with glowing indicators, and all obstacle types (fallen_tree, low_arch, fire_brazier, broken_gap, stone_block, swinging_blade).

    I will update src/components/3d/TempleSegment3D.tsx to remove the unused ObstacleData import.

    I will create src/components/3d/TempleScene.tsx which contains the Three.js canvas, lighting, fog, camera tracking, dynamic endless segment generation, collision detection (coins, gems, power-ups, obstacles, turns, pitfalls), and touch/keyboard controls.

    I will update src/components/3d/TempleScene.tsx to remove the unused imports and variable declarations.

    I will create src/components/ui/HUD.tsx to display the in-game distance, score, coins, power-up timers, pulsing turn direction alerts, pause button, and touch/mouse action buttons.

    I will create src/components/ui/MainMenu.tsx featuring an adventurous ancient relic theme, high score display, character & theme selector, and navigation to the shop, achievements, leaderboard, and tutorial guide.

    I will create src/components/ui/ShopModal.tsx to let players spend their collected coins on power-up upgrades (coin value, magnet, shield, boost durations), character unlocks, and temple theme unlocks.

    I will create src/components/ui/GameOverModal.tsx to display the run summary, score breakdown, high score celebrations with confetti, unlocked achievements, and restart options.

    I will update src/components/ui/GameOverModal.tsx to remove the unused import.

    I will create src/components/ui/AchievementsModal.tsx to display game achievements, progress bars, unlocked status badges, and coin rewards.

    I will create src/components/ui/LeaderboardModal.tsx to display local high scores, distances run, characters used, and run timestamps.

    I will create src/components/ui/ControlsGuideModal.tsx containing an interactive tutorial for keyboard, touch swipe, and turn control mechanics.

    I will create src/App.tsx which integrates the 3D game engine, audio sound manager, shop upgrades, achievement tracking, high score leaderboard, HUD, and modal interfaces.

    I will update src/App.tsx to remove the unused React default import.

    I will now test and build the project using build_project to verify that there are no TypeScript or bundling errors.

    I have created an authentic Temple Run 3D: Relic Escape web game clone using React, Three.js / @react-three/fiber, Tailwind CSS, and the browser's native Web Audio API.

    🏛️ Features Included:

    1. Endless 3D Temple Environment:
      • Procedural Temple Segments: Weathered ancient stone pavements, mossy borders, guardrails, and glowing torch pillars every 8 meters with dynamic flame particles.
      • Dynamic Lighting & Fog: Choose between Jungle Sunset, Midnight Temple (blue sapphire moonlight), and Inferno Caldera (volcanic lava glow).
    2. Iconic Temple Run Hazards & Mechanics:
      • Fallen Mossy Logs: Jump over (W / ArrowUp / Space / Swipe Up).
      • Ancient Stone Arches & Swinging Blades: Slide under (S / ArrowDown / Swipe Down).
      • Broken Floor Gaps: Leap across open abysses.
      • Fire Braziers & Fallen Stone Pillars: Switch between 3 lanes (A / D / ← → / Swipe Left / Right).
      • Stone Turn Junctions: When a golden turn arrow appears, time your turn to round the L-shaped corner.
    3. Playable Characters & Shadow Demon Beast:
      • The Shadow Demon Beast: Roars and chases right behind the runner with glowing red eyes and a dark shadow fur aura.
      • 4 Unlockable Playable Characters:
        • Guy Dangerous (The Relic Explorer - Default)
        • Scarlett Fox (Cunning Escape Artist — +20% Coin Bonus)
        • Karma Shadow (Mystic Jungle Ninja — +25% Score Bonus)
        • Pharaoh Golden (Immortal Sun King — +30% Coins & +30% Score)
    4. Power-Ups & Shop Upgrades:
      • Coin Magnet (M): Automatically pulls gold coins and red gems from all lanes.
      • Guardian Shield (S): Protects against one collision or stumble.
      • Sprint Boost (B): Grants super speed and invincibility, smashing through obstacles.
      • Relic Vault & Shop: Spend collected coins to upgrade durations (Lv 1–5), unlock characters, and unlock temple themes.
    5. Audio Engine (Web Audio API):
      • Procedural tribal jungle drum music loop, metallic coin chimes, whooshing jump/slide sound effects, demon beast roars, and power-up fanfare.
    6. Progression & Leaderboards:
      • Local localStorage persistence for high scores, max distance records, collected coins, upgrades, and achievement badges.

    Files built: index.html, src/index.css, src/types/game.ts, src/utils/soundManager.ts, src/utils/storage.ts, src/utils/generator.ts, src/components/3d/RunnerCharacter.tsx, src/components/3d/DemonBeast.tsx, src/components/3d/Collectibles3D.tsx, src/components/3d/TempleSegment3D.tsx, src/components/3d/TempleScene.tsx, src/components/ui/HUD.tsx, src/components/ui/MainMenu.tsx, src/components/ui/ShopModal.tsx, src/components/ui/GameOverModal.tsx, src/components/ui/AchievementsModal.tsx, src/components/ui/LeaderboardModal.tsx, src/components/ui/ControlsGuideModal.tsx, src/App.tsx

Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.