Marble Race Creator

Seele01-Flash
By
Marble Race Creator is a creative sandbox physics game where you design and build custom marble racing tracks. Create unlimited races, test physics mechanics, and watch colorful marbles compete in your unique tournament designs.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Marble Race Creator**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Create a **2.5D Isometric Sandbox** aesthetic. Use an Orthographic Camera to give it a retro/sim feel (acknowledging the "Pixel" and "2D" tags while using 3D rendering). * **Environment:** A flat, grid-based "Desert Sandbox" ground plane (warm sandy colors). The background should be a simple blue gradient sky. * **Models (Procedural):** * **Marbles:** Simple high-gloss spheres with different distinct colors (Red, Blue, Green, Yellow) to simulate glass/plastic textures. * **Tracks:** Modular 3D blocks or "gutters" that snap to the grid. Include: Straight rails, Curved rails, Slopes (Ramps), and "Dugout" channels. * **Props:** Low-poly Cacti and Rocks as decorative obstacles. * **Finish Line:** A visual trigger zone represented by a checkered texture banner or posts. * **Performance:** Use InstancedMesh for track pieces and obstacles to ensure 60FPS on mobile devices. Keep shadow casting limited to the marbles. ### 2. Audio Requirements * **BGM:** An upbeat, looping **8-bit / Chiptune style** track that evokes a "Construction/Puzzle" vibe (playful and repetitive). * **Sound Effects (SFX):** * **UI:** Crisp "Click/Pop" sounds when selecting track pieces. * **Placement:** A "Thud" or "Snap" sound when a track piece is placed on the grid. * **Marble Physics:** "Clack" sounds for marble-on-marble collisions. A rolling "hum" loop that changes pitch based on speed. * **Victory:** A fanfare or cheering sound when a marble crosses the finish line. ### 3. Gameplay Loop * **Mode 1: Build Mode (Default):** * The player selects track parts from a UI menu. * Tapping on the grid places the selected part. * Tapping an existing part rotates or removes it (context menu). * The player must place a "Spawner" (Start) and a "Finish Line" (End). * **Mode 2: Race Mode:** * The player presses "Start/Spawn". * Marbles spawn from the Spawner with simple physics (gravity and momentum). * Marbles interact with the physical bounds of the placed tracks. * The camera should follow the lead marble automatically or allow the user to watch freely. * The race ends when all marbles finish or fall off the map. * **Physics:** Implement a physics engine (like **Cannon.js** or **Ammo.js**) to handle rolling friction, restitution (bounciness), and collisions accurately. ### 4. Mobile Controls & Interaction * **Screen Orientation:** Forced **Landscape** for a wider field of view of the track. * **Camera Control (Touch Gestures):** * **Two-finger drag:** Pan the camera around the map (Move). * **Pinch:** Zoom in/out. * *(Reasoning: Separating camera movement to two fingers prevents accidental track placement).* * **Building Control:** * **Single Tap:** Place the currently selected object on the grid tile. * **UI Layout:** * **Bottom Bar:** A scrollable horizontal list of buildable parts (Tracks, Spawner, Finish, Decor). Icons should be at least **48x48px**. * **Top Right:** "Play/Reset" toggle button. * **Top Left:** "Clear All" or "Undo" button. * **Feedback:** Visual highlight (ghost mesh) on the grid tile before placing. Haptic feedback (vibration) on successful placement or collision. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Marble Race Creator is an engaging arcade sandbox game that puts the power of track design in your hands. This physics-based simulation lets you create custom marble racing courses, complete with twists, turns, and challenging obstacles. Watch as colorful marbles roll, bounce, and race through your carefully crafted tracks in spectacular 2D pixel art style.

Core Features

Unlimited Creative Freedom

The game offers complete creative control over your marble racing experience. Design simple straight tracks or complex multi-level courses with jumps, loops, and strategic obstacles. Every element responds to realistic physics, making each race unpredictable and exciting.

Intuitive Track Building System

Building tracks is simple yet powerful. The drag-and-drop interface lets you create complex racing circuits without any technical knowledge. Add spawners, modify terrain, and place finish lines exactly where you want them.

Dynamic Physics Simulation

Every marble behaves according to realistic physics laws. Watch as they gain momentum on slopes, slow down on flat surfaces, and interact with each other during races. The physics engine ensures that no two races are exactly the same.

Colorful Visual Experience

The vibrant pixel art style brings your marble races to life. Each marble features distinct colors and smooth animations as they navigate your custom-built courses.

Game Mechanics

Track Creation

Start with a blank canvas and build your dream marble course. Place track segments, ramps, and obstacles to create challenging and entertaining races. The modular building system allows for endless combinations and designs.

Marble Spawning

Control when and where marbles enter your race. Use spawner points to release single marbles or multiple competitors simultaneously. Time your releases to create exciting head-to-head competitions.

Tournament Mode

Create multi-race tournaments by designing several tracks and linking them together. Crown champions and track performance across multiple racing events.

Operation Guide

Mouse Controls: - Left Click + Drag : Navigate around your track design area - Left Click : Place or remove track pieces and elements - Click on Spawner : Release marbles into your race

Building Process: 1. Select track pieces from the building menu 2. Click to place them in your desired locations 3. Connect pieces to form complete racing circuits 4. Add spawners at starting positions 5. Place finish line markers 6. Test your track by spawning marbles 7. Modify and improve based on race results

Why Play This Game

Marble Race Creator combines creativity with physics-based entertainment. It's perfect for players who enjoy building games, physics simulations, or simply watching satisfying marble races unfold. The game requires no special skills to start but offers deep customization for advanced builders. Whether you're creating simple races for relaxation or complex tournaments for challenge, this sandbox provides endless entertainment value.

The game runs entirely in your web browser with no downloads required, making it accessible anywhere. Its intuitive controls mean you can start building immediately, while the sophisticated physics engine ensures your creations behave realistically and provide genuine racing excitement.

Frequently Asked Questions (FAQ)