Flip Cube - Fast-Paced Obstacle Avoidance Game

Seele01-Flash
By
Flip Cube is an addictive fast-paced obstacle avoidance game where you control a cube running up the screen, dodging dangerous spikes by clicking to switch sides. Simple controls, instant gameplay, and endless challenge await!

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Flip Cube". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Minimalist, flat design with a vibrant color palette similar to "Ketchapp" style hyper-casual games. * **Camera**: Use an **Orthographic Camera** to maintain a flat 2D aesthetic while utilizing 3D meshes. View should be top-down or slightly angled to show the depth of the cube. * **Colors**: * **Background**: Bright Solid Cyan/Blue (e.g., Hex `#1E90FF`). * **Rail**: A static, vertical light gray or white line running down the center of the screen (`#EEEEEE`). * **Player**: A white cube (`#FFFFFF`) with rounded edges (use `BoxGeometry` or a bevel modifier). * **Obstacles**: Bright Orange (`#FF8C00`) triangular spikes or cones protruding from the left or right side of the central rail. * **Effects**: Add a slight shadow (ambient + directional light) to give the objects volume. Use a trail renderer or particle stream behind the cube to emphasize speed. * **Optimization**: Reuse geometries for spikes (InstancedMesh) to ensure 60FPS on mobile devices. Use basic materials (`MeshLambertMaterial` or `MeshToonMaterial`) for performance. ### 2. Audio Requirements * **BGM**: Fast-paced, rhythmic chiptune or synth-pop track that loops seamlessly to keep adrenaline high. * **SFX**: * **Flip**: A quick, "whoosh" or air-cutting sound when the player swaps sides. * **Death**: A digital "crunch" or "glass shattering" sound when hitting a spike. * **Score**: A subtle high-pitched "ding" every 10 points/obstacles passed. * **UI**: Standard clicks for start/restart buttons. * *(Note: If external audio files cannot be loaded, please generate simple synthesized beeps using the Web Audio API).* ### 3. Gameplay Loop * **Core Mechanic**: The player controls a cube climbing an infinite vertical line. The game moves automatically (the camera moves up or the world moves down). * **Obstacles**: Spikes appear randomly on the left or right side of the line. The player must be on the opposite side to survive. * **Speed**: The game starts at a moderate pace and gradually accelerates the longer the player survives. * **Scoring**: +1 point for every spike successfully passed. Display the score prominently at the top center. * **Win/Loss**: There is no "win" condition (Endless Runner). Hitting a spike triggers a "Game Over" state, explodes the cube into particles, and shows a "Restart" button with the final score. ### 4. Mobile Controls & Interaction * **Input**: **Tap Anywhere**. Touching the screen instantly flips the cube to the opposite side of the central rail. * **Responsiveness**: The flip must be near-instantaneous (use a very fast linear interpolation or distinct position swap) to allow for reaction to tight obstacle patterns. * **Orientation**: Strictly **Portrait Mode** (Vertical). Handle `window.resize` events to adjust the camera frustum so the gameplay area (rail and spikes) is always visible on different aspect ratios. * **UI/UX**: * Start Screen: Simple "Tap to Start" overlay. * Touch Feedback: Add a subtle `navigator.vibrate(10)` (if supported) on every flip for tactile feedback. * Prevent default browser behaviors like "pull-to-refresh" or double-tap zoom. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Flip Cube is a thrilling online obstacle avoidance game that combines simple mechanics with intense, fast-paced gameplay. With a clean animation style and intuitive controls, this HTML5 game challenges players to guide a cube up the screen while avoiding deadly spikes that appear on both sides of a vertical gray line. The game's minimalist design features a bright blue background that creates perfect contrast against orange spikes, making it easy to quickly identify threats and react accordingly.

Rated 3.6 out of 5 stars by players, Flip Cube delivers instant entertainment without the need for complex tutorials or lengthy learning curves. Each game session is unpredictable - sometimes starting fast with multiple obstacles, other times building up gradually, ensuring every playthrough feels fresh and challenging.

Core Features

Instant Accessibility

  • Completely Free : No payment required, play unlimited sessions
  • No Download Needed : Runs directly in your web browser
  • Cross-Platform Support : Perfect compatibility with desktop and mobile devices
  • HTML5 Technology : Smooth performance across all modern browsers

Simple Yet Addictive Gameplay

  • One-Click Control : Simply click or tap to flip your cube to the other side
  • Clean Visual Design : Minimalist graphics that focus on gameplay essentials
  • Dynamic Difficulty : Each session presents unique spike patterns and speeds
  • High Score System : Track your best performances and compete with others

Mobile-Optimized Experience

The game is perfectly optimized for mobile play, allowing you to enjoy quick gaming sessions anywhere. Touch controls are responsive and precise, making it ideal for both casual play during breaks and intense high-score chasing sessions.

Leaderboard Competition

Compete against players worldwide through the integrated leaderboard system. Your best scores are automatically tracked, and you can see how you rank against other cube runners globally.

Game Strategy

Master the Timing

Success in Flip Cube requires developing quick reflexes and pattern recognition. Watch for spike placement ahead of time and prepare your moves in advance. The key is maintaining steady rhythm while staying alert for sudden pattern changes.

Visual Cues

Use the bright color contrast to your advantage. The orange spikes stand out clearly against the blue background, allowing for split-second decision making even at high speeds.

Operation Guide

Basic Controls

  • Mouse Click : Click anywhere on the screen to flip the cube to the opposite side
  • Touch Control : On mobile devices, tap the screen to switch sides
  • Settings Menu : Access sound controls and quick tutorial
  • Leaderboard : View global rankings and your personal best scores

Gameplay Mechanics

Your cube automatically runs up the screen at varying speeds. Spikes appear randomly on either side of the central gray line. When you see a spike approaching on your current side, click or tap to flip to the safe side. Hitting any spike ends your current session immediately.

Scoring System

Your score increases based on distance traveled and time survived. Longer runs at higher speeds yield better scores. Both your most recent score and personal best are displayed after each game session.

Why Play Flip Cube

Flip Cube excels as a perfect "pick up and play" game that requires no learning curve but offers unlimited replay value. Its instant accessibility makes it ideal for quick entertainment breaks, while the competitive leaderboard system provides long-term motivation for improvement. The game's clean design ensures it runs smoothly on any device, making it your perfect companion for gaming on-the-go.

Whether you're looking for a few minutes of casual fun or an intense high-score challenge, Flip Cube delivers engaging gameplay that's easy to start but difficult to master. The unpredictable nature of each session keeps the experience fresh, while the simple one-click control scheme makes it accessible to players of all skill levels.

Frequently Asked Questions (FAQ)