Space Cubes - 3D Puzzle Game

Seele01-Flash
By
Space Cubes is a vibrant 3D puzzle game that combines classic Mahjong mechanics with innovative rotating gameplay. Set in outer space with colorful cube graphics, challenge yourself through 10 increasingly difficult levels.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Space Cubes". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Sci-Fi Neon aesthetic. The game takes place in deep space. * **Core Assets (The Cubes):** * Generate 3D cubes with slightly rounded beveled edges (to catch light). * **Materials:** Semi-transparent, glossy materials in vibrant colors: Neon Red, Electric Blue, Toxic Green, Bright Purple, and Amber. * **Textures:** Each color type should have a unique glowing holographic symbol (alien glyphs, abstract shapes, or stars) centered on its faces. * **Selection State:** When a user selects a cube, it should pulse or glow brighter to indicate the active state. * **Background:** A deep dark blue/black skybox with a generated starfield (using `THREE.Points`) that slowly rotates to add dynamism without causing motion sickness. * **Effects:** When cubes match, they should not just disappear; use a particle explosion effect (fragments matching the cube's color) before removing the mesh. * **Mobile Optimization:** Use `InstancedMesh` where possible for cubes to reduce draw calls, or simple geometry merging. Limit real-time shadows; use baked lighting or emissive materials to simulate neon glow. ### 2. Audio Requirements * **BGM:** A relaxing, atmospheric "Space Synth" or "Lo-Fi Sci-Fi" track. It should be loopable and non-intrusive to aid concentration. * **Sound Effects (SFX):** * **Tap/Select:** A soft, high-tech "blip" or mechanical click. * **Match Success:** A satisfying digital "chime" or "energy dispersion" sound. * **Rotation:** A subtle "swoosh" wind sound when the player spins the puzzle cluster. * **Error/Invalid Move:** A low-pitch "buzz" or "thud" if a player taps a blocked cube. * **Win:** An uplifting fanfare. * **Time Warning:** A ticking clock sound when the timer is below 10 seconds. ### 3. Gameplay Loop * **Core Mechanic:** 3D Mahjong Solitaire. * **Setup:** Generate a 3D cluster of cubes (start simple for Level 1, e.g., a 4x4x4 cube with some missing blocks to create depth). * **Matching Logic:** The player must tap two cubes of the same color/symbol to remove them. * **Validation:** A cube is only selectable if it has at least **two adjacent sides free** (not completely enclosed by other cubes). * **Win Condition:** Clear all cubes from the screen. * **Lose Condition:** The countdown timer (starts at 3 minutes) reaches zero. * **Progression:** Implement a simple level system (1 to 10). Each level increases the total number of cubes and the complexity of the 3D arrangement. ### 4. Mobile Controls & Interaction * **Camera Control (The "Spin"):** * Implementation: Use `OrbitControls`. * **Action:** One-finger drag to rotate the entire puzzle cluster 360 degrees to find hidden blocks. * **Constraint:** Disable zoom (dolly) to keep the UI consistent, or clamp it strictly. Auto-rotate slightly when idle. * **Interaction:** * **Raycasting:** Precise touch detection. Tapping a cube selects it. Tapping empty space does nothing. * **Visual Feedback:** Upon touch, play a small scale-up/scale-down animation (tweening) to confirm input immediately. * **UI Layout (Mobile Responsive):** * **Top Bar (HUD):** Display current Level, Score, and Countdown Timer. Use a bold, futuristic font. * **Orientation:** The game must be responsive, but optimize for **Portrait Mode** by default (as phone users often play puzzles one-handed). The 3D scene stays in the center; UI stays at the top/bottom edges. * **Touch Targets:** Ensure UI buttons (Pause, Mute, Restart) are at least 44x44 pixels. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Space Cubes

Space Cubes is an engaging online puzzle game that brings a fresh twist to traditional Mahjong gameplay. Set against a stunning outer space backdrop, this colorful 3D puzzle adventure challenges players to match cubes while navigating a unique rotating game board. With its bright, eye-catching graphics and innovative mechanics, Space Cubes offers puzzle enthusiasts an out-of-this-world gaming experience.

The game features a distinctive 3D animation system that allows players to rotate the entire game board, revealing hidden cubes and creating new matching opportunities. This spatial puzzle element adds depth and strategy to the classic matching formula, making each level a unique brain teaser.

Core Features

Revolutionary 3D Gameplay

Unlike traditional flat Mahjong games, Space Cubes introduces a fully rotatable 3D environment. Players can spin the board 360 degrees to discover hidden cubes and plan strategic matches. This innovative mechanic transforms simple matching into a spatial reasoning challenge.

Progressive Difficulty System

The game includes 10 carefully crafted levels , each more challenging than the last. Starting with simple arrangements, the puzzles gradually increase in complexity, introducing more cubes, tighter time limits, and intricate 3D formations that test your spatial awareness.

Vibrant Space Theme

Immerse yourself in a beautifully designed space environment featuring: - Bright, colorful cube designs that are easy to distinguish - Stunning cosmic backgrounds that enhance the gaming experience - Smooth 3D animations that bring the puzzle to life - Space-themed sound effects that complement the visual experience

Flexible Gaming Options

  • Completely free to play with no hidden costs or subscriptions
  • Cross-platform compatibility - works on desktop computers, tablets, and smartphones
  • No download required - plays directly in your web browser
  • Pause functionality for interrupted gaming sessions
  • Adjustable sound settings to customize your experience

Game Mechanics

Matching Rules

Space Cubes follows enhanced Mahjong principles: - Match two identical cubes that are not blocked by other cubes - Only "free" cubes (those with at least one open side) can be selected - Use the target cube indicator at the top to identify your current matching goal - Switch target cubes using the arrow controls for strategic planning

Time Challenge Element

Each level includes a countdown timer that adds urgency to your puzzle-solving: - Complete all matches before time runs out - Failed levels can be replayed immediately - No penalty for retrying levels - Timer pressure increases strategic thinking and quick decision-making

Operation Guide

Basic Controls

  • Click/Tap : Select matching cubes to remove them from the board
  • Arrow Keys or Drag : Rotate the 3D board to view all angles
  • Target Switcher : Use arrows near the target cube to change your matching objective
  • Pause Button : Located in the right panel for game interruption
  • Sound Controls : Adjust or mute audio through the settings panel

Winning Strategy Tips

  1. Explore All Angles : Always rotate the board completely before making moves
  2. Plan Ahead : Look for cubes that will become accessible after current matches
  3. Use Target Switching : Change target cubes strategically to clear difficult areas
  4. Time Management : Balance speed with accuracy - rushed moves often lead to dead ends
  5. Pattern Recognition : Learn common 3D arrangements to spot matches faster

Why Play Space Cubes

Perfect for All Skill Levels

Whether you're new to puzzle games or a Mahjong veteran, Space Cubes offers: - Easy learning curve with intuitive controls - Progressive difficulty that grows with your skills - No pressure gameplay with unlimited retries - Short sessions perfect for quick mental breaks

Cognitive Benefits

Regular play helps develop: - Spatial reasoning through 3D board manipulation - Pattern recognition skills for faster matching - Strategic planning abilities for complex arrangements - Focus and concentration under time pressure

Accessibility Features

  • Works on all modern devices without installation
  • Colorblind-friendly cube designs with distinct shapes
  • Adjustable difficulty through level progression
  • Pause-and-resume functionality for flexible gaming

Space Cubes represents the evolution of classic puzzle gaming, combining time-tested Mahjong mechanics with innovative 3D technology. The game's unique rotating perspective creates endless possibilities for strategic play, while its colorful space theme and progressive difficulty ensure hours of engaging entertainment.

Frequently Asked Questions (FAQ)