Free The Key

Seele01-Flash
By
Free The Key is a challenging block-sliding puzzle game where you must strategically move wooden blocks to unlock and free the golden key. Test your logic and spatial reasoning skills in this classic brain teaser.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Free The Key: Temple of Logic**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Ancient Aztec/Mayan temple aesthetic. The game board is a square stone slab recessed into a temple floor. * **Camera:** Fixed top-down OrthographicCamera to ensure the puzzle grid is perfectly square and readable on mobile screens without perspective distortion. * **Models (Procedural):** * **Blocks:** Use `BoxGeometry` with beveled edges (or small chamfer) to simulate heavy stone bricks. * **Textures:** Procedurally generate or use placeholder colors to represent textures: * **Vertical Blocks:** Darker, rough sandstone (e.g., Terracotta/Brown). * **Horizontal Blocks:** Lighter limestone (e.g., Beige/Sand). * **The Key Block:** A distinct, glowing Gold metallic material with high shininess (`MeshStandardMaterial` with high metalness). * **Border:** An intricate decorative border surrounding the 6x6 grid, with a clear "Exit Gate" opening on the right side of the 3rd row. * **Lighting:** Warm, torch-lit atmosphere. Use a `PointLight` with a slight flicker to simulate fire, plus soft `AmbientLight` to illuminate the shadows. * **Performance:** Use instanced meshes if possible for identical blocks, or keep geometry low-poly (e.g., <100 faces per block) for smooth mobile FPS. ### 2. Audio Requirements * **BGM:** A calm, contemplative ambient track featuring distant jungle sounds, soft wind, and a slow, rhythmic wooden flute or marimba melody to aid concentration. * **Sound Effects (SFX):** * **Block Select:** A subtle "stone tap" sound when touching a block. * **Sliding:** A continuous, heavy "grinding stone" loop that plays only while a block is moving, pitch-shifted slightly based on speed. * **Collision:** A solid "thud" when a block hits a wall or another block. * **Win:** A magical, ancient mechanism unlocking sound (gears turning + chime) when the Gold Key exits the grid. ### 3. Gameplay Loop * **Core Mechanic:** A classic sliding block puzzle (Unblock Me style) set on a 6x6 grid. * **Block Logic:** * **Vertical Blocks (2x1 or 3x1):** Can ONLY move up and down. * **Horizontal Blocks (1x2 or 1x3):** Can ONLY move left and right. * **The Key Block (1x2):** A horizontal block usually placed in the 3rd row. * **Win Condition:** The player must slide the obstructing stone blocks out of the way to create a clear path for the **Key Block** to slide out through the "Exit Gate" on the right edge of the board. * **Level Design:** Initialize with a pre-defined solvable layout (hardcoded array for the MVP). * **UI:** A "Reset" button and a "Level Counter" displayed at the top. ### 4. Mobile Controls & Interaction * **Touch Input:** Use Three.js `Raycaster` mapped to `touchstart`, `touchmove`, and `touchend` events. * **1:1 Movement:** The block must follow the user's finger exactly (clamped to its allowed axis). Do not use "click to move"; use "drag to slide". * **Axis Locking:** When a user touches a vertical block, strictly ignore horizontal swipe inputs for that block, and vice-versa. * **Visual Feedback:** * Highlight the active block slightly (emissive material boost) when touched. * Spawn tiny dust particles at the base of the block while it is sliding to simulate friction. * **Screen Adaptation:** * **Orientation:** Force or design for **Portrait Mode**. The grid should occupy the center width of the screen. * **SafeArea:** Ensure the grid and UI buttons are within the safe area (avoiding notches/home bars). * **Prevent Default:** Explicitly prevent default browser scrolling (`e.preventDefault()`) on the canvas to ensure the page doesn't move while the player is solving the puzzle. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Free The Key is a captivating block-sliding puzzle game that challenges players to think strategically and plan their moves carefully. In this beautifully crafted wooden puzzle, your objective is simple yet engaging: slide the various wooden blocks around the board to create a clear path for the golden key to escape.

The game features a classic wooden aesthetic with rich textures and warm colors that create an inviting and relaxing atmosphere. Each puzzle presents a unique challenge where different sized wooden blocks are arranged in a confined space, and you must figure out the correct sequence of moves to free the key.

Core Features

Classic Puzzle Mechanics

Free The Key follows the timeless tradition of sliding block puzzles that have challenged minds for generations. The game requires no complex rules or special abilities - just pure logical thinking and spatial awareness.

Beautiful Wooden Design

The game features stunning wooden textures and craftsmanship-inspired visuals. The golden key stands out beautifully against the rich brown and amber tones of the wooden blocks, creating an aesthetically pleasing gaming experience.

Progressive Difficulty

While the concept is simple to understand, mastering Free The Key requires patience and strategic thinking. Each level presents increasingly complex arrangements that will test your problem-solving abilities.

Relaxing Gameplay

Unlike timed puzzle games, Free The Key allows you to think at your own pace. There's no pressure or time limits - just you, the puzzle, and your logical thinking skills.

Gameplay Mechanics

The game operates on straightforward sliding mechanics:

  • Wooden blocks of various sizes occupy the game board
  • The golden key is trapped among these blocks
  • Your goal is to slide blocks horizontally and vertically to create an exit path
  • Blocks can only slide into empty spaces, requiring careful planning
  • Success is achieved when the key can slide to the exit

Strategic Elements

Every move matters in Free The Key. You'll need to: - Analyze the current block arrangement - Plan several moves ahead - Sometimes move blocks away from the goal to create necessary space - Think about which blocks need to move first to enable other movements

Operation Guide

Mouse Control: - Click and drag any wooden block to slide it in available directions - Horizontal movement: Drag blocks left or right if space allows - Vertical movement: Drag blocks up or down when possible - Goal: Create a clear path for the golden key to reach the exit

Visual Feedback: - Blocks will only move in valid directions where space is available - The golden key will highlight when it has a clear escape route - Smooth animations show the movement of blocks across the wooden board

Tips for Success: - Start by identifying which blocks are directly blocking the key's path - Look for blocks that can be moved to create temporary storage space - Work backwards from the exit to plan your sequence of moves - Don't be afraid to undo moves if you get stuck

Why Play Free The Key

Mental Exercise

Free The Key provides excellent brain training, improving your spatial reasoning, logical thinking, and problem-solving skills. It's like a mental gym session disguised as entertainment.

Stress Relief

The game's peaceful wooden aesthetic and unhurried gameplay make it perfect for relaxation and stress relief. Take your time and enjoy the meditative quality of solving each puzzle.

Classic Appeal

Sliding block puzzles have entertained people for over a century, and Free The Key captures this timeless appeal with modern presentation and smooth gameplay.

Accessibility

With simple mouse controls and clear visual design, the game is accessible to players of all ages and skill levels. Whether you're a puzzle veteran or newcomer, you can enjoy the challenge.

Perfect for Short Breaks

Each puzzle can be completed in just a few minutes, making it ideal for quick mental breaks during work or study sessions.

Frequently Asked Questions (FAQ)