Dice Puzzle - Strategic Number Merging Game

Seele01-Flash
By
Dice Puzzle is an engaging strategic puzzle game that challenges you to merge numbered dice cubes on a colorful game board. Combine three or more adjacent cubes with matching numbers to create higher-valued dice and test your logical thinking skills.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Dice Puzzle". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** High-saturation, "glossy plastic" aesthetic similar to casual mobile hits. The view should be a fixed, slightly angled top-down perspective (Orthographic Camera preferred for puzzle precision). * **The Board:** A 5x5 grid plane with a soft green felt-like texture or a clean tile grid. Each cell should have a subtle inset or border to clearly define placement slots. * **The Dice (Main Assets):** * Create 3D cubes with beveled edges (RoundedBoxGeometry) to look smooth and toy-like. * **Color Coding:** * 1: Red * 2: Blue * 3: Pink/Purple * 4: Yellow/Orange * 5: Cyan * 6: Green/Lime * Special (Wildcard/Magic): Multicolored or Glowing White. * **Pips:** Use white spheres or textures for the dots. * **Particles & Effects:** * A "Pop" particle explosion when dice merge. * A glowing highlight around the "Next Piece" spawn area. * A "Ghost/Shadow" effect on the grid showing where the piece will land while dragging. * **Performance:** Use `InstancedMesh` for the grid background if possible. Keep dice geometry simple (low polygon count) as there may be ~30 dice on screen. Use simple Lambert or Phong materials for performance over PBR. ### 2. Audio Requirements * **BGM:** A relaxing, lo-fi or light jazz track. It should be unobtrusive and loop seamlessly to aid concentration. * **Sound Effects (SFX):** * **Placement:** A satisfying wooden or plastic "clack" sound when a die lands on the board. * **Rotation:** A quick "whoosh" or "click" when the player taps the pending piece to rotate it. * **Merge:** A rising pitch "chime" or "ding" sequence (Combo sounds should increase in pitch). * **Game Over:** A soft, descending minor-key thud. ### 3. Gameplay Loop * **Spawn Logic:** * Generate a "Next Piece" at the bottom center. This piece can be a **Single Die** or a **Double Die** (two dice connected horizontally or vertically). * The values of the dice are random (weighted towards 1-4 initially). * **Placement & Merging:** * The player drags the piece onto the 5x5 grid. * **Match 3 Mechanic:** If 3 or more dice with the same number touch horizontally or vertically (not diagonally), they merge into **one single die** of the next number value (e.g., three 2s become one 3). * **Combo:** If the resulting merge causes a new set of 3 to align, a chain reaction occurs. * **Special Merge:** Merging three '6' dice creates a special "M" (Magic/Jewel) die. Merging three "M" dice triggers an explosion that clears a 3x3 area or the whole board. * **Storage Mechanic:** * Include a "Hold" slot. If the player cannot use the current piece, they can drag it to the Hold slot to save for later. * **Game Over:** The game ends when the board is full and the current piece cannot be placed anywhere. ### 4. Mobile Controls & Interaction * **Camera:** Fixed Portrait orientation. Lock zoom and rotation to prevent user disorientation. * **Input Handling:** * **Tap (on Spawn Area):** Rotates the current piece 90 degrees. * **Drag & Drop:** The primary mechanic. Raycasting must be used to map touch coordinates to the grid. * **Touch Offset:** *Crucial for mobile:* Render the die slightly *above* the user's finger touch point (y-axis offset) so the player's finger doesn't obscure the visual of where the die is being placed. * **UI Layout:** * **Top:** Score display and High Score. * **Center:** The 5x5 Game Board. * **Bottom:** The "Spawn/Current Piece" area (Center) and the "Hold/Storage" button (Left or Right). * **Feedback:** * **Haptics:** Trigger a light vibration (using `navigator.vibrate`) on successful placement and a heavy vibration on Game Over. * **Visual Cue:** When dragging, light up the grid cells green if the placement is valid, or red if invalid (occupied). Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Dice Puzzle is a captivating strategic puzzle game that combines the excitement of dice with clever merge mechanics. In this colorful and engaging puzzle experience, players must strategically place numbered dice cubes on a vibrant game board, carefully planning each move to create powerful combinations and achieve the highest possible scores.

The game features a unique twist on traditional puzzle mechanics, where numbered dice serve as both the puzzle pieces and the scoring system. Each cube displays different dot patterns representing various numerical values, and your goal is to create matching groups that merge into more valuable pieces.

Core Features

Strategic Dice Placement System

Every move matters in Dice Puzzle. You'll need to think several steps ahead as you place each numbered cube on the board. The game rewards careful planning and strategic thinking, making each decision crucial to your success.

Dynamic Merge Mechanics

The heart of the gameplay lies in merging three or more adjacent cubes with identical numbers. When cubes combine, they transform into higher-valued dice, creating a satisfying progression system that keeps you engaged for hours.

Smart Storage Management

Utilize the built-in storage space to save dice for future use. This strategic element adds depth to the gameplay, allowing you to plan complex combinations and save powerful pieces for the perfect moment.

Colorful Visual Design

The game features bright, eye-catching graphics with vibrant dice in multiple colors including red, blue, purple, yellow, and green. The cheerful design makes the puzzle-solving experience both visually appealing and mentally stimulating.

Cross-Platform Compatibility

Enjoy seamless gameplay across all devices. Whether you're playing on desktop, tablet, or smartphone, the game adapts perfectly to your screen size and input method.

Gameplay Mechanics

Cube Placement Strategy

Dice cubes appear either individually or in pairs, requiring you to adapt your strategy based on what pieces are available. Consider each cube's position carefully, as placement determines your ability to create future merges.

Horizontal and Vertical Merging

Create combinations by aligning three or more identical numbered cubes in straight lines, either horizontally or vertically. Diagonal matches don't count, so focus on creating clean rows and columns.

Value Progression System

As cubes merge, their numerical values increase, creating more powerful pieces. Higher-valued cubes are worth more points and can lead to spectacular chain reactions when merged with other high-value pieces.

Controls and Interface

Simple Mouse Controls

  • Rotate Dice : Left-click on any dice cube to rotate it and view different number faces
  • Place Dice : Drag and drop cubes onto the board using your mouse
  • Storage Management : Move cubes to and from storage areas with simple drag actions

Intuitive Game Board

The clean, grid-based board layout makes it easy to visualize potential moves and plan your strategy. Clear visual indicators show where pieces can be placed and which combinations are possible.

Why Play Dice Puzzle

Perfect Brain Training

This game provides excellent mental exercise, combining spatial reasoning, pattern recognition, and strategic planning. It's an ideal way to keep your mind sharp while having fun.

Stress-Free Gaming

With no time limits or pressure mechanics, you can play at your own pace and think through each move carefully. This makes it perfect for relaxation and casual gaming sessions.

Endless Replayability

Each game presents new challenges and opportunities for different strategies. The random nature of piece generation ensures that no two games are exactly alike.

Suitable for All Ages

The simple rules and intuitive controls make this game accessible to players of all skill levels, from puzzle beginners to experienced strategy game enthusiasts.

Free Online Access

Play immediately without downloads, registrations, or payments. Simply open your browser and start solving puzzles right away.

Frequently Asked Questions (FAQ)