Stacktris - Balance & Stack Tetromino Blocks

Seele01-Flash
By
Stacktris is a challenging arcade game that combines Tetris mechanics with physics-based tower building. Stack spinning tetromino blocks carefully to build the tallest tower without letting any pieces fall off.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Stacktris". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Minimalist "Low-poly" aesthetic with a vibrant, flat color palette against a dark charcoal grey background (#222222). * **Camera:** Use an **Orthographic Camera** to simulate a 2.5D perspective (Side View). This removes perspective distortion and makes precise stacking easier. * **Block Models (Tetrominoes):** Generate standard Tetris shapes (I, O, T, S, Z, J, L) using compound `BoxGeometries`. Each block should be a single rigid body physically but visually composed of individual cubes. * *Colors:* Cyan (I), Yellow (O), Purple (T), Green (S), Red (Z), Blue (J), Orange (L). * *Material:* `MeshLambertMaterial` or `MeshStandardMaterial` with slight roughness to look like matte plastic. * **Lighting:** A strong Directional Light from the top-left to cast soft, diagonal shadows (essential for depth perception). Add a weak Ambient Light to prevent pitch-black shadows. * **Platform:** A static, wide grey rectangular base at the bottom of the screen. * **Optimization:** Use `InstancedMesh` if possible for individual cubes, or merge geometries to keep draw calls low on mobile devices. ### 2. Audio Requirements * **BGM:** A looping, low-tempo "Think piece" or "Puzzle" style track. Minimalist electronic synthesizer, distinct but not distracting. * **Sound Effects (SFX):** * *Spin Loop:* A quiet, rising pitch whirring sound while the block spins. * *Lock/Stop:* A crisp mechanical "Click" when the player holds the screen to stop rotation. * *Drop:* A "Whoosh" sound on release. * *Impact:* A heavy "Thud" based on impact velocity (physics collision). * *Game Over:* A discordant "Shatter" or "Topple" sound effect. ### 3. Gameplay Loop * **Physics Engine:** Use **Cannon-es** (or similar lightweight physics library compatible with Three.js) for realistic collision, mass, and friction. * **Phase 1: Spawn & Spin:** A new random Tetromino spawns at the top center. It immediately begins rotating on the Z-axis (2D plane rotation). The rotation speed increases exponentially the longer it waits. * **Phase 2: Player Interaction:** * **Touch Start:** The block immediately **stops rotating**. * **Touch Move:** The player drags their finger horizontally (X-axis). The block follows the finger's X position (clamped within screen bounds). * **Touch End:** The block is released and physics gravity takes over. * **Phase 3: Stabilization:** The camera slightly pans up as the stack grows. * **Win/Loss Condition:** * *Score:* +1 point for every successfully stacked block. * *Game Over:* If any block falls off the platform (y-position drops below the threshold), the game ends immediately. * **Physics Settings:** High friction materials (to make stacking easier) and low restitution (bounciness) to prevent blocks from jittering off the tower. ### 4. Mobile Controls & Interaction * **Control Scheme:** The entire screen is the input area. * *Press & Hold:* Freeze rotation. * *Drag:* Position left/right. * *Release:* Drop. * **Orientation:** Portrait Mode (Vertical) preferred for tower stacking. * **Visual Feedback:** * When the player holds touch, display a faint vertical "Ghost Line" or dotted trajectory downwards to show where the block will land. * Flash the screen red slightly if a block is tipping over dangerously. * **Haptic Feedback:** Trigger `navigator.vibrate(50)` (short pulse) when a block lands successfully on the stack. Trigger a longer vibration on Game Over. * **UI:** Minimalist UI. Current Score displayed in big font at the top center (behind the gameplay layer). A "Restart" button appears only on Game Over. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Stacktris is an innovative arcade game that merges the beloved Tetris experience with challenging tower stacking mechanics. This physics-based puzzle game tests your precision and patience as you carefully balance spinning tetromino blocks to create the tallest possible tower.

The game features vibrant, colorful graphics with classic Tetris-shaped pieces that spin at increasingly fast speeds. Your goal is simple yet challenging: stack these blocks without letting a single piece fall off the platform.

Core Features

Unique Spinning Mechanics

Unlike traditional Tetris, blocks in Stacktris spin continuously and accelerate over time. You must time your clicks perfectly to stop the rotation at the right angle for optimal stacking.

Physics-Based Gameplay

Every block placement matters due to realistic physics simulation. Blocks can slide, bounce, and topple if not positioned correctly, adding an extra layer of challenge to the classic puzzle formula.

Upgrade System

Collect coins during gameplay to purchase powerful upgrades: - Slow Spin : Reduces initial rotation speed for easier timing - High Friction : Prevents blocks from sliding off each other - Coin Magnet : Attracts coins automatically to your blocks - Low Bounce : Reduces block bouncing for more stable stacking - Wide Table : Expands the platform width for easier placement - Next Block Preview : Shows upcoming tetromino shapes

Progressive Difficulty

As you build higher, the challenge increases with faster spinning speeds and more complex block arrangements, keeping the gameplay engaging and progressively challenging.

Gameplay Instructions

Desktop Controls

  • Click and Hold : Stop tetromino rotation
  • Mouse Drag : Position the block horizontally above the platform
  • Release Click : Drop the block
  • A/D or Arrow Keys : Fine-tune horizontal positioning
  • ESC : Access main menu
  • Enter : Pause game

Mobile Controls

  • Long Press : Stop block spinning
  • Drag : Move block horizontally to desired position
  • Release : Drop the block onto the stack

The intuitive control scheme works seamlessly across all devices, ensuring smooth gameplay whether you're on desktop or mobile.

Game Strategy

Timing is Everything

Success in Stacktris requires mastering the timing of stopping spinning blocks. Watch the rotation pattern and click at the optimal moment to achieve the best stacking angle.

Build a Stable Foundation

Start with a wide, stable base using longer tetromino pieces. This foundation will support taller structures and prevent early collapses.

Use Physics to Your Advantage

Understand how blocks interact with each other. Sometimes allowing controlled sliding or bouncing can help pieces settle into better positions.

Why Play Stacktris

Stacktris offers a fresh take on classic puzzle gaming that appeals to both Tetris veterans and newcomers. The game provides:

  • Free-to-Play : Completely free with no hidden costs or premium content
  • Cross-Platform : Works perfectly on computers, phones, and tablets
  • No Download Required : Play instantly in any modern web browser
  • Addictive Progression : Upgrade system provides long-term goals
  • Skill-Based Challenge : Pure skill gameplay with no luck elements
  • Social Competition : Challenge friends to beat your highest tower

Whether you have five minutes or an hour, Stacktris provides engaging entertainment that's easy to start but difficult to master. The combination of familiar Tetris shapes with innovative physics creates a uniquely satisfying puzzle experience.

Frequently Asked Questions (FAQ)