Mine Sweeper - Classic Puzzle Game

Seele01-Flash
By
Mine Sweeper is a reimagined version of the beloved classic puzzle game that challenges your logic and memory skills. Clear the minefield using numerical clues while avoiding hidden mines in this timeless brain teaser.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Modern 3D Minesweeper**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Modern "Flat Design" translated into 3D. The aesthetic should match the reference: clean, high-contrast, and minimalist. * **The Board**: A grid of tiles. Each tile should be a slightly chamfered cube (rounded edges) to catch light. * *Unrevealed Tile*: Muted Teal/Greenish-Grey (`#8DA8A6`). * *Revealed Empty Tile*: Dark Slate/Charcoal (`#2F3638`). * *Exploded Mine Tile*: Danger Red (`#D34549`). * *Flag Tile*: Bright Yellow (`#FCE61F`). * **Assets**: * **Numbers (1-8)**: Big, bold, sans-serif white text centered on revealed tiles. * **Mine**: A dark spherical mesh with small spikes, centered on the tile. * **Flag**: A simple 2D icon or low-poly 3D flag shape appearing on top of yellow tiles. * **Camera & Lighting**: Use an **Orthographic Camera** to maintain the "board game" feel without perspective distortion. The view should be Top-Down (90 degrees) or slightly angled (e.g., 80 degrees). Use soft ambient light plus a directional light to create subtle shadows indicating tile depth. * **Performance Optimization**: **CRITICAL**: Use `THREE.InstancedMesh` for the grid tiles. Do not create individual Mesh objects for every tile, as this will kill mobile performance on larger grids. ### 2. Audio Requirements * **BGM**: A loop of ambient, "thinking" music. Minimalist melodic techno or soft jazz piano. It should be relaxing to aid concentration. * **SFX**: * *Tile Reveal*: A crisp, wooden "Clack" or "Flip" sound. * *Flag Placement*: A soft "Thud" or "Stick" sound. * *Explosion*: A heavy, bass-filled "Boom" followed by a short losing jingle. * *Victory*: A bright, ascending chime or fanfare. * *UI Click*: Standard soft click for menus. ### 3. Gameplay Loop * **Difficulty Selection**: Start with a simple UI overlay to select: Easy (9x9, 10 mines), Medium (16x16, 40 mines), or Hard (Mobile-friendly custom size, e.g., 16x30). * **Core Logic**: * Clicking a tile reveals it. * If the tile is a **Mine**: Game Over immediately. The clicked mine turns Red, and all other unflagged mines are revealed. * If the tile is a **Number**: Show the number of adjacent mines. * If the tile is **Empty (0)**: Perform a **Flood Fill (Recursive Reveal)** algorithm to automatically open all adjacent empty tiles and their border numbers. * **Win Condition**: All non-mine tiles are revealed. A "Game Won" modal appears with the time taken. ### 4. Mobile Controls & Interaction * **Touch Input Handling**: Use a `Raycaster` for accurate tile selection. * **Control Scheme (The "Flagging" Problem)**: Since right-click doesn't exist on mobile, implement a **UI Toggle Button** at the bottom of the screen: * **Dig Mode (Default)**: Tapping reveals a tile. * **Flag Mode**: Tapping places/removes a flag. * *Visual Cue*: Change the cursor or highlight the active mode clearly. * **Animations**: * When a tile is revealed, it should play a quick `Tween` animation (e.g., flip 180 degrees or sink down slightly) rather than just changing texture instantly. * **Haptic Feedback**: Use `navigator.vibrate(50)` when a flag is placed and `navigator.vibrate([100, 50, 100])` when a mine is hit (if supported by the device). * **Orientation**: The game layout must be responsive. The grid should scale to fit the width of the screen in Portrait mode. * **UI Layout**: Place the "Reset" button, "Timer", and "Mine Counter" in a sticky header bar. Make sure buttons are at least 44x44 pixels 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 Mine Sweeper

Mine Sweeper is a classic puzzle game that has captivated players for decades with its perfect blend of logic, strategy, and careful deduction. This modern version brings the timeless gameplay to your browser with crisp visuals and smooth mechanics. The objective is simple yet challenging: clear a minefield by revealing safe tiles while avoiding the deadly mines hidden beneath.

Core Features

This reimagined classic offers everything you love about the original Mine Sweeper:

  • Three Difficulty Levels : Choose from beginner-friendly grids to expert challenges that will test even seasoned players
  • Intuitive Number System : Each revealed tile shows how many mines are adjacent to it, providing crucial clues for your next move
  • Clean Modern Interface : Enjoy the classic gameplay with updated visuals that are easy on the eyes
  • Unlimited Gameplay : Play as many rounds as you want with no time restrictions or limitations
  • Cross-Platform Support : Works perfectly on desktop computers, tablets, and mobile devices
  • No Download Required : Play instantly in your web browser without any installations

Strategic Gameplay Elements

Mine Sweeper rewards careful thinking and pattern recognition. The numbered tiles serve as your guide - a "1" means one mine is adjacent, a "3" indicates three nearby mines, and so on. Master players learn to recognize common patterns and use logical deduction to safely navigate even the most complex minefields.

Perfect for All Skill Levels

Whether you're new to Mine Sweeper or a veteran player, the three difficulty settings ensure an appropriate challenge. Beginners can start with smaller grids and fewer mines, while experts can tackle large, mine-dense fields that require advanced strategies.

How to Play

Mine Sweeper's elegance lies in its simple controls and deep strategic gameplay:

Basic Controls: - Click or Tap : Reveal what's hiding under any tile - Right-Click (desktop): Flag tiles you suspect contain mines - Strategic Planning : Use the numbers revealed to deduce safe moves

Winning Strategy: 1. Start by clicking tiles in corners or edges where you have more information 2. Use the numbers to count adjacent mines and identify safe tiles 3. Flag suspected mines to keep track of dangerous areas 4. Clear all safe tiles to win - but hit a mine and it's game over!

Reading the Numbers: Each number tells you exactly how many mines touch that tile. A "2" surrounded by two flagged mines means all other adjacent tiles are safe to click.

Why Play Mine Sweeper

Mental Exercise

Mine Sweeper is more than entertainment - it's a workout for your brain. Regular play improves logical thinking, pattern recognition, and strategic planning skills.

Timeless Appeal

This classic has remained popular for good reason. Its perfect balance of luck and skill creates gameplay that's easy to learn but impossible to master completely.

Stress Relief

The focused concentration required provides an excellent break from daily stress. Many players find the logical puzzle-solving meditative and relaxing.

Quick Gaming Sessions

Each game can be completed in just a few minutes, making it perfect for short breaks or longer gaming sessions.

No Pressure Gaming

Play at your own pace with no time limits or competitive pressure. Focus purely on the puzzle and enjoy the satisfaction of clearing each minefield.

Frequently Asked Questions (FAQ)