Marble Run 3D - Country Marble Racing Game

Seele01-Flash
By
Marble Run 3D is an exciting 3D racing game where you represent your country with a uniquely designed marble, competing against players from around the world in thrilling races to the finish line.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Marble Run 3D**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** High-saturation, "Hyper-Casual" aesthetic. Bright, sunny lighting using a `DirectionalLight` with soft shadows and an `HemisphereLight` for ambient fill. * **Marbles (Player & AI):** Use `THREE.SphereGeometry`. Apply `MeshStandardMaterial` with high `roughness: 0.1` and `metalness: 0.2` to simulate glossy polished balls. The texture maps should be country flags (USA, Brazil, Turkey, etc.). * **The Track:** A procedurally generated, downward-sloping path resembling a wooden ramp. Texture it with a seamless wood grain. * **Borders:** Add yellow and black "caution stripe" low-poly cylinders or rails along the edges to keep marbles in play, but leave "gap" sections where marbles can fall off. * **UI/Overlays:** Use `THREE.Sprite` or HTML overlays to display floating labels (e.g., "P1", "P2") above the marbles. * **Performance:** Use low-poly geometries for environment props. Reuse geometries/materials (InstancedMesh) for the track segments to maintain 60FPS on mobile devices. ### 2. Audio Requirements * **BGM:** A fast-paced, energetic, looping electronic/synth track that encourages speed and competition. * **SFX:** * **Rolling:** A continuous low-rumble loop that increases in pitch/volume as the marble's velocity increases. * **Collision:** A sharp "clack" sound (like billiard balls) when marbles hit each other. * **Impact:** A dull thud when hitting the wooden side rails. * **Victory/Defeat:** A cheerful trumpet fanfare for finishing 1st; a comical "whistle down" sound if the player falls off the track. ### 3. Gameplay Loop * **Start:** The marbles spawn at the top of a slope behind a starting gate. A "3, 2, 1, GO!" countdown UI overlay triggers the start. * **Mechanics:** * **Auto-Run:** Gravity pulls all marbles downward automatically. The track should have physics gravity enabled (suggest using `cannon-es` or a simple custom physics implementation for sphere rolling). * **Rivals:** AI marbles (3-5 bots) move down the track, occasionally making random slight left/right swerves to block the player or knock them off. * **Collision:** If the player hits a rival with high lateral velocity, the rival should be pushed sideways (impulse force). * **Win/Loss:** * **Win:** Cross the checkered finish line at the bottom. Rank is determined by arrival order. * **Loss:** Falling off the edge of the track results in a "Respawn" or "Game Over" screen. ### 4. Mobile Controls & Interaction * **Touch Input (Swipe/Drag):** Implement a **1-to-1 horizontal follow** mechanic. * When the player touches the screen and drags left/right, the marble applies force to move left/right relative to the camera view. * The marble should *not* stop moving forward; controls only affect the X-axis (steering). * **Screen Orientation:** **Portrait Mode** is preferred to see further down the track. * **Haptic Feedback:** Trigger `navigator.vibrate(10)` heavily when colliding with another marble, and lightly when hitting the side rails. * **Camera:** Implement a smooth "Follow Camera" that trails the P1 marble. It should have a slight `lerp` (delay) on the X-axis to make the movement feel dynamic, but stay rigid on the Z-axis (forward) to keep the player in focus. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Marble Run 3D

Marble Run 3D is a fast-paced racing game that combines patriotic pride with competitive marble racing action. Choose your country's marble and roll into intense multiplayer races where strategy, speed, and skill determine the winner. The game features stunning 3D graphics, realistic physics, and exciting gameplay that keeps players coming back for more racing action.

Whether you're representing the USA, Brazil, UK, Turkey, India, or any other nation, each marble is beautifully designed with authentic country flags and colors. The game's physics engine creates realistic marble movement and collision effects, making every race feel authentic and engaging.

Core Features

Country Representation System

Select from dozens of country-themed marbles, each featuring authentic flag designs and national colors. Show your patriotic spirit as you compete against marbles from around the globe in international racing competitions.

Dynamic Racing Mechanics

Experience thrilling marble physics with realistic rolling, bouncing, and collision effects. Smash rival marbles off the track using strategic positioning and momentum, but be careful not to fall off yourself!

Multiple Game Modes

  • Race Mode : Compete against up to 8 players in real-time multiplayer races
  • Challenge Mode : Practice your skills with increasingly difficult obstacle courses
  • Tournament Mode : Participate in country-based competitions for ultimate bragging rights

Stunning 3D Environments

Race through beautifully crafted 3D tracks with varying terrains, obstacles, and environmental challenges. From desert courses to icy slopes, each track offers unique racing experiences.

Cross-Platform Gaming

Enjoy seamless gameplay across all devices - desktop computers, smartphones, and tablets. The game automatically adjusts controls and interface for optimal performance on your device.

Gameplay Mechanics

Racing Strategy

Success in Marble Run 3D requires more than just speed. Master the art of: - Momentum Management : Build speed on straightaways and control it through turns - Tactical Bumping : Strategically knock opponents off course without losing your own position - Obstacle Navigation : Learn track layouts to find the fastest routes through challenging sections - Defensive Rolling : Protect your position while maintaining competitive speed

Physics-Based Movement

The game's advanced physics engine creates realistic marble behavior. Your marble responds naturally to: - Track surface materials and friction levels - Gravitational effects on slopes and jumps - Collision forces from other marbles and obstacles - Environmental factors like wind resistance

Operation Guide

Desktop Controls

  • A/D Keys or Left/Right Arrow Keys : Steer your marble left and right
  • Mouse Movement : Alternative steering control for precise navigation
  • Spacebar : Quick brake for emergency stops (if available)

Mobile Controls

  • Touch and Drag : Move your finger left or right on the screen to steer
  • Tap Controls : Simple tap-based steering for easy one-handed play
  • Gyroscope Support : Tilt your device for intuitive marble control (where supported)

Pro Tips for Success

  1. Start Strong : Get a good position early to avoid getting knocked around by other marbles
  2. Learn the Tracks : Memorize obstacle patterns and find optimal racing lines
  3. Time Your Attacks : Wait for the right moment to bump opponents off narrow sections
  4. Practice in Challenge Mode : Improve your skills before entering competitive races
  5. Choose Your Battles : Sometimes avoiding conflict is better than engaging risky confrontations

Why Play Marble Run 3D

Instant Fun, No Downloads Required

Jump into the action immediately through your web browser. No installation, no waiting - just pure marble racing excitement whenever you want it.

Represent Your Country

Feel the pride of racing for your nation! The country-themed marbles add a personal connection and competitive edge that makes every victory more meaningful.

Perfect for All Skill Levels

Whether you're a casual gamer looking for quick fun or a competitive player seeking racing mastery, Marble Run 3D offers the right challenge level through its various game modes.

Social Competition

Compete against friends and players worldwide. Share your victories, challenge rivals, and climb the global leaderboards to prove your marble racing supremacy.

Stress-Free Gaming

Enjoy a completely free gaming experience with no hidden costs, no pay-to-win mechanics, and no forced advertisements interrupting your gameplay.

Frequently Asked Questions (FAQ)