TenTrix - 10x10 Block Puzzle Game

Seele01-Flash
By
TenTrix is an engaging 10x10 block puzzle game that combines strategy with colorful gameplay. Place pieces anywhere on the board, clear complete rows and columns, and challenge yourself to achieve the highest score possible.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "TenTrix". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: High-gloss, "Jewel/Gel" aesthetic. The blocks should look like beveled squares or flattened pyramids (low-poly 3D style) with a slight inner glow. Use `MeshPhysicalMaterial` with transmission or high roughness/metalness to simulate a plastic or glass texture. * **Color Palette**: Vibrant, neon-like colors for blocks (Cyan, Orange, Red, Purple, Green, Blue) contrasting against a deep blue, tech-grid background. * **Camera**: Orthographic camera (top-down view) to ensure the 10x10 grid is perfectly square and readable on mobile screens, while still showing the 3D depth of the blocks. * **Grid**: A 10x10 tile board. The empty slots should be dark translucent squares with a glowing outline. * **Performance**: Use `InstancedMesh` for the grid tiles and blocks if possible to reduce draw calls. Limit dynamic lights to 1 directional light and 1 ambient light. ### 2. Audio Requirements * **BGM**: A relaxing, low-tempo "Zen Puzzle" electronic track. Think soft synth pads and light rhythmic ticking, similar to ambient logic game soundtracks. * **Sound Effects**: * **Pickup**: A soft "pop" or suction sound when lifting a piece. * **Placement**: A satisfying "glass click" or "snap" sound when a piece locks into the grid. * **Line Clear**: A harmonious digital chord or "shimmer" sound that rises in pitch if multiple lines are cleared simultaneously (Combo). * **Invalid Move**: A subtle low-frequency buzz or visual "shake" feedback. * **Game Over**: A descending tone or "power down" effect. ### 3. Gameplay Loop * **Core Mechanic**: A 10x10 grid puzzle. Three random block shapes (Tetrominoes + custom shapes like single dots or 2x2 squares) spawn at the bottom of the screen. * **Action**: Players drag and drop these pieces onto the board. Pieces *do not* fall; they can be placed anywhere there is free space. * **Clearing**: When a row or column is completely filled (10 blocks), it vanishes instantly, awarding points. Colors do not need to match to clear a line. * **Progression**: The player must use all 3 spawned pieces to trigger the next batch of 3. * **Game Over Condition**: If there is no valid space on the board for any of the remaining pieces in the spawn area, the game ends. * **Scoring**: Points for placing blocks + bonus points for clearing lines. High score should be saved locally. ### 4. Mobile Controls & Interaction * **Touch Input**: Use Raycaster for touch events (`touchstart`, `touchmove`, `touchend`). * **Drag Offset**: **Crucial for Mobile**: When the user drags a piece, render the piece slightly *above* the touch point (y-axis offset) so the player's finger doesn't obscure the block they are placing. * **Screen Orientation**: Portrait mode is preferred. The Grid takes up the upper center, and the spawn area is at the bottom. * **Visual Feedback**: * **Ghost/Highlight**: When dragging a piece over the board, highlight the potential grid slots underneath in a semi-transparent white to show where it will snap. * **Valid/Invalid**: If the hover position is invalid, tint the ghost piece red. * **UI Scaling**: Score and Reset buttons must be large enough for touch targets (min 44px height). Prevent default browser scrolling/zooming gestures on the canvas. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

TenTrix is a captivating puzzle game that puts a fresh spin on the classic block-matching genre. Set on a 10x10 grid, this colorful puzzle challenge offers unlimited gameplay potential with no time pressure. Unlike traditional falling-block games, TenTrix gives you complete control over piece placement, allowing you to build your strategy from any direction.

The game features vibrant, colorful blocks in various shapes that you must strategically place to create complete rows or columns. With its simple drag-and-drop mechanics and endless gameplay possibilities, TenTrix appeals to puzzle enthusiasts of all skill levels.

Core Features

Strategic Block Placement

TenTrix revolutionizes puzzle gaming by removing the physics constraints found in traditional block games. You can place pieces anywhere on the 10x10 board, giving you complete freedom to develop your own unique strategies.

Colorful Visual Design

The game showcases a beautiful array of colorful blocks - orange, purple, blue, and green pieces that create visually appealing patterns as you play. The clean grid design and bright colors make for an enjoyable visual experience.

No Time Pressure Gaming

Unlike fast-paced puzzle games, TenTrix allows you to take your time. Think through each move carefully, plan ahead, and develop the perfect strategy without rushing.

Endless Gameplay Potential

The game can continue indefinitely as long as you have space for new pieces. This creates opportunities for extremely high scores and extended gaming sessions.

Three-Piece Challenge System

TenTrix presents you with three pieces at a time, and you must use all of them before receiving new ones. This adds a strategic element that requires forward thinking and careful planning.

Gameplay Mechanics

How Clearing Works

Complete any full row or column (horizontally or vertically) to clear it from the board. Unlike color-matching games, you don't need to match colors - any combination of blocks can form a clearable line.

Piece Variety

The game includes diverse piece shapes beyond traditional Tetris blocks. These unique shapes add complexity and require different strategic approaches.

Scoring System

Earn points for every line you clear and track your high score for future games. The scoring encourages both efficient clearing and long-term survival strategies.

Operation Guide

Desktop Controls: - Mouse : Click and drag pieces from the bottom selection area to any position on the 10x10 grid - Placement : Drop pieces in any available space that fits the piece shape

Mobile Controls: - Touch : Tap and drag pieces using your finger - Precise Placement : Touch and hold to position pieces exactly where you want them

The game automatically detects when you've placed a piece in a valid position and will snap it into place on the grid.

Strategy Tips

Think Beyond Traditional Tetris

Don't approach TenTrix like a falling-block game. You can build in any direction - up, down, left, right, or even create complex patterns.

Plan for Future Pieces

Since you see three pieces at once, always consider how all three will fit together. Look for placement opportunities that work for multiple pieces.

Avoid Small Enclosures

Many TenTrix pieces are large and irregularly shaped. Creating small isolated spaces can quickly lead to game over situations.

Balance Clearing and Building

While clearing lines gives points, sometimes it's better to save space for future pieces rather than clear immediately.

Why Play TenTrix

TenTrix offers a perfect blend of relaxation and mental challenge. The absence of time pressure means you can enjoy the game at your own pace, while the strategic depth keeps you engaged for hours. Whether you're looking for a quick mental break or an extended puzzle session, TenTrix delivers satisfying gameplay that improves with practice.

The game's colorful design and smooth mechanics make it accessible to newcomers, while the strategic complexity provides lasting appeal for puzzle veterans. Plus, with its browser-based platform, you can enjoy TenTrix anywhere without downloads or installations.

Frequently Asked Questions (FAQ)