Road Blocks - Puzzle Game

Seele01-Flash
By
Road Blocks is a challenging puzzle game where every move matters. Navigate through mazes using directional momentum - once you start moving, you can't stop until you hit a wall. Master portals, springs, and laser traps to escape!

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Road Blocks". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Modernized Minimalist 3D. Retain the "dark void" aesthetic of the original but upgrade the flat sprites to 3D geometry. * **Player**: A perfectly smooth, reflective white Sphere (`MeshPhysicalMaterial` with clearcoat) to contrast against the dark environment. * **Walls/Blocks**: Use `InstancedMesh` for performance. The blocks should be dark grey cubes with beveled edges (or a geometry that mimics the "pyramid" look of the screenshot). Give them a slight metallic sheen so they catch the light. * **The Grid/Floor**: A subtle, dark grid plane (`GridHelper` or a plane with a grid shader) that is barely visible, ensuring the player feels "trapped in a maze of empty space." * **Lighting**: A dramatic 3-point lighting setup. One directional light casting sharp shadows to give depth to the blocks, and ambient light to ensure visibility. * **Camera**: **Orthographic Camera** angled at 45 degrees (ISO view) or top-down (90 degrees). The camera must dynamically zoom/fit to ensure the entire puzzle grid is visible within the screen width, regardless of the device aspect ratio. * **Mobile Optimization**: * Use `InstancedMesh` for all wall blocks to reduce draw calls. * Limit dynamic shadows to the player ball if performance drops. * Use simple geometric primitives instead of loading external .obj/.gltf files for faster loading. ### 2. Audio Requirements * **BGM**: A minimal, ambient electronic track. Think "thinking music"—repetitive, low-tempo, and atmospheric (e.g., soft synth pads). * **Sound Effects (SFX)**: * **Slide**: A satisfying "whoosh" or rolling sound that scales with speed. * **Impact**: A crisp, percussive "clack" or "thud" when the ball hits a wall and stops. This provides crucial tactile feedback. * **Win/Portal**: A futuristic digital chime when reaching the goal. * **UI**: Soft clicks for menu interactions. ### 3. Gameplay Loop * **Core Mechanic (The "Ice Slide")**: The player cannot move step-by-step. When a direction is chosen, the ball **must** slide continuously in that direction until it collides with a wall or an obstacle. * **Objective**: Navigate the ball from the Start position to the Exit Portal/Goal. * **Level Logic**: * Grid-based system (e.g., a 10x10 array). * **State 0**: Empty space (Ball moves over it). * **State 1**: Wall (Ball stops *before* entering this cell). * **State 2**: Start Point. * **State 3**: Exit/Portal. * **State 4 (Advanced)**: Traps (Lasers) or Springs (Bounce player back). * **Win Condition**: The ball stops on the Exit tile (or passes through it). * **Fail Condition**: There are no fail states in the basic version unless the player enters a "Trap" tile, which resets the level. ### 4. Mobile Controls & Interaction * **Control Scheme**: **Swipe Gestures**. * Detect `touchstart` and `touchend` events on the canvas. * Calculate the vector difference. If the horizontal difference is greater than the vertical, trigger Left/Right movement. Otherwise, trigger Up/Down. * **Threshold**: Set a minimum swipe distance (e.g., 30px) to prevent accidental inputs. * **Movement Animation**: Use a tweening library (like TWEEN.js or GSAP, or a custom interpolation function in the render loop) to smoothly animate the ball from its current position to the target destination. The movement should be fast but readable. * **Screen Orientation**: Optimized for **Portrait Mode** (vertical layout), as puzzle grids fit well on mobile screens. However, the canvas should resize responsively. * **UI & Feedback**: * **Haptic Feedback**: Trigger `navigator.vibrate(10)` when the ball hits a wall. * **Visual Trails**: A faint trail renderer or particle system behind the ball to emphasize speed. * **UI Overlay**: A "Retry" button (icon: circular arrow) placed in the top-right corner (min-size 44x44px) for easy resetting if the player gets stuck in a loop. A "Level X" indicator at the top center. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Road Blocks

Road Blocks is an innovative puzzle game that challenges players to think several moves ahead. With a unique movement system where you continue moving in one direction until hitting an obstacle, this game transforms simple navigation into a complex strategic challenge. The game has maintained popularity among puzzle enthusiasts for its clever mechanics and progressively challenging levels.

Core Features

Unique Movement System

The game's signature mechanic requires careful planning - once you choose a direction (up, down, left, or right), you'll keep moving until you encounter a wall or obstacle. This creates a domino effect where each move determines your available options for the next.

Progressive Complexity

  • Portal System : Activate and utilize teleportation portals to reach otherwise inaccessible areas
  • Spring Mechanisms : Use bouncy surfaces to change direction or reach higher platforms
  • Laser Traps : Navigate around dangerous obstacles that require precise timing
  • Multi-layered Puzzles : Each level introduces new elements while building on previously learned mechanics

Brain Training Benefits

Road Blocks isn't just entertainment - it's mental exercise that improves: - Strategic Planning : Think multiple moves ahead to succeed - Problem-solving Skills : Each level presents unique challenges requiring creative solutions - Spatial Reasoning : Visualize movement patterns and consequences - Pattern Recognition : Learn to identify optimal paths through complex mazes

Gameplay Mechanics

Basic Movement

Use the arrow keys to control your character. Remember that once you start moving in a direction, momentum carries you until you hit a wall or obstacle. This physics-based movement system is the core of every puzzle.

Strategic Elements

  • Maze Navigation : Every level is essentially a maze of empty spaces with strategic obstacles
  • Portal Activation : Some levels feature portals that transport you to different areas
  • Obstacle Interaction : Springs, walls, and other elements affect your movement path
  • Goal Achievement : Reach the exit while navigating all movement constraints

Operation Guide

Controls : - Arrow Keys: Move in four directions (up, down, left, right) - No additional controls needed - simplicity meets complexity

Strategy Tips : 1. Plan Ahead : Always consider where your current move will leave you 2. Use Walls Strategically : Obstacles aren't just barriers - they're stopping points that enable new directions 3. Portal Mastery : Learn how portals connect different areas of each level 4. Practice Patience : Some levels require multiple attempts to discover the solution

Why Play Road Blocks

Perfect for Puzzle Enthusiasts

If you enjoy games that challenge your mind rather than your reflexes, Road Blocks delivers exactly that experience. The game rewards careful thinking over quick reactions, making it perfect for players who love to solve complex problems.

Accessible Yet Challenging

The simple control scheme (just arrow keys) means anyone can start playing immediately, but mastering the strategic depth takes time and practice. This perfect balance makes it suitable for casual players and puzzle experts alike.

Progressive Learning Curve

The game introduces new mechanics gradually, allowing players to master basic concepts before adding complexity. Just when you feel comfortable with the current mechanics, new elements like springs or laser traps keep the experience fresh and challenging.

No Pressure Gaming

There are no time limits or lives to lose - take as much time as you need to plan your moves and solve each puzzle. This stress-free environment encourages experimentation and learning from mistakes.

Frequently Asked Questions (FAQ)