Cubefield

Seele01-Flash
By
Cubefield is an intense first-person racing game where you navigate a triangle through an endless field of dangerous cubes. Test your reflexes in this fast-paced avoider game with simple yet challenging gameplay.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Cubefield**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Ultra-minimalist, retro-arcade aesthetic. * **Color Palette:** * **Sky/Background:** A smooth linear gradient from light grey (horizon) to white or darker grey (top), blending seamlessly with scene fog. * **Ground:** An infinite, flat grey plane. * **Player:** A small, dark grey or black tetrahedron (pyramid shape) or arrow, sharp and geometric. * **Obstacles:** Simple Cubes. Colors should vary between bright Orange and Red to contrast heavily against the grey background. * **Lighting & Effects:** * Use `THREE.FogExp2` to fade distant cubes into the background color, creating a sense of infinite depth and hiding asset generation. * Directional light to cast sharp shadows from the cubes onto the ground (essential for depth perception). * **Optimization:** Use `THREE.InstancedMesh` for the cubes to maintain high FPS on mobile devices, as there will be many objects on screen. ### 2. Audio Requirements * **BGM:** A driving, minimalist electronic drone or low-fi synth track that increases in pitch or tempo as the player's speed increases. * **SFX:** * **Engine:** A subtle, continuous "hum" or "wind rush" noise. * **Pass-by:** A "Whoosh" sound when passing close to a cube (Proximity check). * **Crash:** A sharp, digital "crunch" or static noise upon collision. * **UI:** Crisp "blip" sounds for starting the game or restarting. ### 3. Gameplay Loop * **Core Mechanic:** Infinite runner/avoider. The player moves forward automatically at a constant speed that gradually accelerates over time. * **Obstacle Generation:** Cubes appear on the horizon. They should be generated in "waves" or semi-random patterns using Perlin noise or randomized rows to create gaps the player must steer through. * **Scoring:** Score is based on distance traveled. Display the score prominently at the top center. * **Win/Loss:** * **Collision:** If the player hits a cube, the game stops immediately (freeze frame or explosion particle effect). * **Restart:** A "Game Over" UI overlay appears with the final score and a "Tap to Restart" button. ### 4. Mobile Controls & Interaction * **Touch Controls (Steering):** * Implement **Split-Screen Touch**: * Touching the **Left half** of the screen steers the ship Left. * Touching the **Right half** of the screen steers the ship Right. * Movement should have slight inertia/lerp (linear interpolation) so the ship doesn't snap instantly but feels like it is "steering." * **Orientation:** Landscape mode is preferred for a wider field of view, but the camera FOV should adapt dynamically if the user is in Portrait mode to ensure upcoming cubes are visible. * **Feedback:** * **Visual:** Tilt the player mesh (roll rotation) slightly in the direction of the turn. * **Haptic:** Trigger `navigator.vibrate(200)` upon collision/game over. * **UI:** Ensure the Canvas takes up 100% of the window (`window.innerWidth`, `window.innerHeight`) and prevent default browser scrolling/zooming behaviors (`touch-action: none`). Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Cubefield is a thrilling first-person racing game that combines speed, precision, and quick reflexes. With an impressive rating of 4.5/5 stars from thousands of players, this addictive avoider game challenges you to navigate a small triangle through an increasingly dangerous field of colorful cubes. The game's minimalist design and intense gameplay have made it a classic in the online gaming world.

Unlike traditional racing games, Cubefield focuses purely on steering and avoidance skills rather than speed control. As you progress, the cube field becomes denser and more challenging, requiring split-second decisions and lightning-fast reactions.

Core Features

Intense First-Person Perspective

Experience the thrill of high-speed navigation from a first-person viewpoint. The immersive camera angle puts you directly in the pilot's seat, making every near-miss feel incredibly intense and every collision more impactful.

Progressive Difficulty System

The game starts with sparse cube formations but gradually increases in complexity. As you advance, cubes appear more frequently and in more challenging patterns, ensuring the game remains exciting and challenging throughout your playthrough.

Minimalist Visual Design

Cubefield's clean, geometric aesthetic focuses your attention on what matters most - the cubes you need to avoid. The simple graphics ensure smooth performance across all devices while maintaining visual clarity during high-speed gameplay.

Endless Gameplay

With no finish line in sight, Cubefield offers unlimited replayability. Challenge yourself to beat your previous high score and see how far you can navigate through the increasingly treacherous cube field.

Gameplay Instructions

Mastering Cubefield requires understanding both the controls and strategy:

Basic Controls: - Left Arrow Key : Steer your triangle left - Right Arrow Key : Steer your triangle right - P Key : Pause the game when you need a break - Q Key : Adjust graphics quality for optimal performance

Gameplay Strategy: - Focus on the immediate path ahead rather than distant cubes - Make small, precise movements rather than dramatic steering changes - Use peripheral vision to anticipate upcoming obstacles - Stay calm during intense sequences - panic leads to crashes - Practice smooth, flowing movements for better control

Why Play Cubefield

Perfect for Quick Gaming Sessions

Cubefield is ideal for short gaming breaks or extended play sessions. Each attempt typically lasts a few minutes, making it perfect for casual gaming, yet addictive enough for longer play sessions as you strive to improve your score.

Skill Development

The game excellently trains hand-eye coordination, reaction time, and spatial awareness. Regular play can improve your reflexes and decision-making speed, skills that transfer to other gaming genres.

Universal Appeal

With simple controls and clear objectives, Cubefield appeals to players of all ages and skill levels. Beginners can enjoy the basic challenge while experienced gamers can push for incredible high scores and perfect runs.

Free and Accessible

Completely free to play with no hidden costs or premium features. The game runs smoothly in any modern web browser without requiring downloads, installations, or account creation.

Competitive Element

Challenge friends and family to beat your high score. The simple scoring system makes it easy to compare achievements and create friendly competition.

Frequently Asked Questions (FAQ)