Cube Rotate - Physics Puzzle Game

Seele01-Flash
By
Cube Rotate is an innovative physics puzzle game that challenges you to rotate geometric shapes and guide colored squares to their matching portals. Test your spatial reasoning skills in this free browser-based puzzle adventure.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Cube Rotate". Please read the following detailed game design requirements first, and then generate the code accordingly. Since this game relies heavily on 2D physics within a 3D visualization, please integrate **Matter.js** (for physics logic) with **Three.js** (for rendering). ### 1. Assets & Environment * **Visual Style:** Minimalist "2.5D" aesthetic. Use an **Orthographic Camera** to maintain a puzzle-like, non-distorted view. * **Color Palette (Based on reference):** * **Background:** Deep Terracotta/Dark Orange (`#8B4513` or similar). * **Maze Walls:** Light Cyan/Blue rounded blocks (`#ADD8E6`), slightly extruded to show depth. * **Active Blocks:** Vibrant, distinct colors (Orange, Blue, Purple) representing the "gems" or "cubes" inside the maze. * **Portals/Goals:** Glowing zones on the floor of the maze matching the Active Block colors (use semi-transparent materials with `emissive` properties). * **Lighting:** Soft `AmbientLight` combined with a `DirectionalLight` from the top-left to cast soft shadows, emphasizing the depth of the blocks against the background. * **Performance:** Use `InstancedMesh` for the wall blocks if possible, or simple `BoxGeometry` with low segment counts. Ensure materials are `MeshLambertMaterial` or `MeshPhongMaterial` for performance over realism. ### 2. Audio Requirements * **BGM:** A lo-fi, cerebral, and relaxing ambient track. Something repetitive but not annoying, suitable for thinking (e.g., soft keys, slow tempo). * **Sound Effects (SFX):** * **Rotation:** A satisfying "Whoosh" or mechanical servo sound when the maze rotates. * **Collision:** A "Clack" or "Thud" sound (varied by velocity) when loose blocks hit the walls (wood-on-wood or plastic-on-plastic sound). * **Success:** A bright "Chime" or "Ding" when a colored block settles into its correct portal. * **Win:** A short, celebratory chord when the level is cleared. ### 3. Gameplay Loop * **Core Mechanic:** The player controls a large container (the Maze). Inside the maze, there are loose colored blocks and fixed wall blocks. * **Physics:** Gravity always pulls "down" relative to the screen bottom. When the player rotates the maze, the loose blocks tumble and fall according to the new orientation. * **Goal:** Maneuver the loose colored blocks into specific "Portal Zones" of the matching color. * **Win Condition:** All colored blocks must come to a rest inside their respective colored target zones simultaneously for 2 seconds. * **Level Logic:** Start with a simple enclosed square with one block and one goal. Progress to complex mazes with obstacles and multiple colored blocks. ### 4. Mobile Controls & Interaction * **Controls:** Implement two large, transparent overlay buttons on the bottom left (Rotate Counter-Clockwise) and bottom right (Rotate Clockwise) of the screen. * *Alternative:* Allow Swipe gestures (Swipe Left to rotate CCW, Swipe Right to rotate CW). * **Rotation Physics:** The maze should rotate smoothly (e.g., 90-degree increments) with an easing function (e.g., `elasticOut` or `backOut`) to give it a "heavy" but responsive feel. * **Feedback:** * **Haptic:** Trigger `navigator.vibrate(50)` when a loose block hits a wall hard or when a rotation completes. * **Visual:** A subtle screen shake effect on heavy impacts. * **Orientation:** Lock to **Portrait Mode** for mobile phone usage, ensuring the maze fits within the width of the device. * **UI:** Minimalist HUD showing "Level" and a "Reset" button in the top corner (min-size 44x44px for touch accessibility). Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Cube Rotate

Cube Rotate is a captivating physics puzzle game that transforms the classic cube concept into an engaging 2D puzzle experience. With a stellar 4.3/5 rating, this free online game challenges players to master the art of rotation and physics to solve increasingly complex puzzles.

In this unique puzzle adventure, you'll manipulate jagged, angular shapes filled with colorful squares, rotating them strategically to deliver each square to its corresponding colored portal. The game combines spatial reasoning, physics understanding, and patience to create a truly rewarding puzzle experience.

Core Features

Physics-Based Puzzle Mechanics

Cube Rotate utilizes realistic physics simulation to create authentic movement and rotation. Every spin and rotation affects how the squares fall and move within the shape, making each level a unique physics challenge.

Intuitive Controls

Whether you're playing on desktop or mobile, the game offers seamless control options: - Desktop : Use your mouse to point, click, and spin shapes with precision - Mobile : Tap and drag with your finger for smooth touch controls - Cross-Platform : Perfectly optimized for both computer and mobile devices

Progressive Difficulty

Start with simple shapes and gradually progress to more complex geometric puzzles. Each level introduces new challenges that test your understanding of cause and effect in physics-based environments.

Colorful Visual Design

Enjoy vibrant colors and clean geometric designs that make identifying matching squares and portals easy while maintaining visual appeal.

Gameplay Mechanics

The core gameplay revolves around strategic rotation and physics manipulation:

  1. Analyze the Shape : Study the current position of colored squares within the geometric shape
  2. Identify Target Portals : Locate the matching colored portals where squares need to be delivered
  3. Plan Your Rotation : Consider how physics will affect square movement when you rotate
  4. Execute Precisely : Click and drag to rotate the shape, watching squares fall toward their targets
  5. Achieve Perfect Matches : Successfully guide all squares to their corresponding portals to complete the level

Operation Guide

Desktop Controls

  • Mouse Click : Select and grab the shape
  • Mouse Drag : Rotate the shape in desired direction
  • Release : Let physics take effect as squares fall into position

Mobile Controls

  • Tap : Select the shape you want to manipulate
  • Drag : Rotate by dragging in circular motions
  • Release : Allow gravity and physics to move the squares

Pro Tips for Success

  • Study the shape layout before making your first move
  • Rotate slowly to better control square movement
  • Use gravity to your advantage by positioning squares above their target portals
  • Think several moves ahead, as some puzzles require multiple rotations

Why Play Cube Rotate

Mental Exercise

This game provides excellent brain training, improving spatial reasoning, problem-solving skills, and understanding of physics principles. It's perfect for players who enjoy intellectual challenges.

Accessible Entertainment

As a free HTML5 game, Cube Rotate requires no downloads or installations. Simply open your browser and start playing immediately on any device.

Suitable for All Ages

With its "All Ages" content rating, this puzzle game is perfect for family entertainment, educational settings, or personal relaxation time.

Perfect for Short Sessions

Each puzzle can be completed in just a few minutes, making it ideal for quick mental breaks during work or study sessions.

Stress-Free Gaming

Unlike action games, Cube Rotate allows you to take your time, think through solutions, and enjoy a calm, meditative gaming experience.

Frequently Asked Questions (FAQ)