Toy Factory - Puzzle Game

Seele01-Flash
By
Toy Factory is a delightful match-3 puzzle game where you help adorable toys escape from a stuffy toy store. With 45 challenging levels and colorful graphics, it's perfect for puzzle lovers of all ages.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Toy Factory". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** High-saturation, "Toon-shaded" or "Glossy Plastic" aesthetic. The game should look like a vibrant children's toy store. * **Game Board:** A vertical grid (e.g., 7 columns x 9 rows) of 3D cubes. * **Blocks:** Rounded cubes (BoxGeometry with bevels) in 4 distinct bright colors: Hot Pink, Lime Green, Cyan Blue, and Sunny Yellow. Each block should have a simple white icon texture on the front face (e.g., Star, Moon, Rocket, Heart). * **Toys (Rescue Targets):** Distinct 3D geometries that sit on top of the block stacks or are embedded within the grid. Examples: A simple composed "Rubber Duck" (yellow spheres), a "Ball" (striped sphere), or a "Robot" (grey cubes). * **Background:** A blurred, warm-colored backdrop suggesting a factory interior or shelves stacked with boxes. Use a `Fog` to blend the distant background. * **Effects:** * **Explosion:** When blocks are cleared, spawn simple geometric particles (confetti) in the matching color. * **Animations:** Use **GSAP (GreenSock)** or a simple tweening function for smooth falling animations when blocks collapse. Blocks should "bounce" slightly when they hit the bottom. ### 2. Audio Requirements * **BGM:** A cheerful, looping, upbeat track (caliope or synth-pop style) that evokes a whimsical factory atmosphere. * **Sound Effects (SFX):** * **Tap/Select:** A soft "pop" or "bubble" sound. * **Match Clear:** A satisfying "crunch" or plastic scattering sound. * **Falling:** A "whoosh" or slide whistle for blocks falling down. * **Toy Rescue:** A winning chime or "Tada!" sound when a Toy object reaches the bottom row. * **Win:** A celebratory fanfare. ### 3. Gameplay Loop * **Core Mechanic (Collapse/Blast):** Instead of swapping, use a **"Tap-to-Clear"** mechanic. * The player taps on a block. * Algorithm: Check connected neighbors (Flood Fill). If **3 or more** adjacent blocks of the same color exist, destroy them. * **Gravity & Spawning:** * When blocks are destroyed, the blocks (and Toys) above them must fall down to fill the empty space. * New random blocks spawn at the top to refill the columns. * **Objective:** The goal is to "Free the Toys". * Toys start at random positions in the grid or spawn at the top. * The player must clear blocks underneath the Toys to bring them to the absolute bottom row (y = 0). * When a Toy hits the bottom, it is "collected" (removed from board) and the score increases. * **Win Condition:** Collect a specific number of toys (e.g., 3) to win the level. ### 4. Mobile Controls & Interaction * **Orientation:** **Portrait Mode** (vertical layout) to suit the tall grid structure. * **Controls:** * **Raycaster:** Implement precise touch/mouse detection. * **Input Logic:** `touchstart` (or click) on a block triggers the match check. * **Feedback:** * **Haptic:** Trigger `navigator.vibrate(10)` on a successful match. * **Visual:** When a user touches a block that is part of a valid group (3+), momentarily highlight or scale up that group of blocks *before* popping them to show the player what will be removed. * **UI Layout:** * Top Bar: "Toys Saved: 0/3" and "Score". * Bottom Area: Reset Button. * Ensure all UI 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 Toy Factory

Toy Factory is an enchanting puzzle game that combines match-3 mechanics with a heartwarming rescue mission. In this colorfully decorated adventure, you'll help desperate toys including bunnies, aliens, rubber ducks, and teddy bears escape from their confining toy store. With a stellar rating of 4.4/5 stars, this game has captured the hearts of puzzle enthusiasts worldwide.

Core Features

Engaging Match-3 Gameplay

The core mechanics revolve around matching 3 or more identical blocks to make them disappear. As blocks vanish, the toys sitting on top will gradually descend, bringing them closer to freedom. This simple yet addictive gameplay keeps players engaged for hours.

45 Challenging Levels

Toy Factory offers 45 progressively challenging levels, each presenting unique puzzles and obstacles. Every level requires strategic thinking to ensure no toy gets left behind, as abandoning even one toy means restarting the level.

Adorable Character Variety

The game features a delightful cast of toy characters: - Cute Bunnies : Fluffy companions waiting for rescue - Friendly Aliens : Otherworldly toys seeking freedom - Rubber Ducks : Classic bath-time favorites - Teddy Bears : Cuddly companions ready for adventure

Vibrant Visual Design

The blocks are beautifully adorned with bold colors and charming images including unicorns, rockets, spaceships, and other fun characters. The colorful decoration creates an inviting atmosphere that appeals to players of all ages.

Cheerful Audio Experience

The game features uplifting background music that perfectly complements the cheerful visual design, creating an immersive and joyful gaming experience.

Gameplay Guide

Basic Controls

Playing Toy Factory is intuitive and accessible: - Click or Tap : Select blocks to match - Match 3+ : Connect three or more identical blocks to clear them - Strategic Planning : Plan moves to ensure all toys reach the bottom

Winning Strategy

Success in Toy Factory requires careful planning: 1. Analyze the Layout : Study the block arrangement before making moves 2. Prioritize Toy Rescue : Focus on clearing paths for toys to descend 3. Think Ahead : Consider how each move affects the overall puzzle 4. No Toy Left Behind : Ensure every toy reaches safety to complete the level

Progress Tracking

The game displays your current level and score at the top of the screen, allowing you to track your progress through all 45 levels. The main menu also features a High Scores section where you can compare your performance against other players worldwide.

Platform Compatibility

Toy Factory is designed as an instant-play game, meaning: - No Downloads Required : Play directly in your web browser - Mobile Optimized : Perfect touch controls for smartphones and tablets - Cross-Platform : Seamlessly works on PC, Mac, iOS, and Android devices - Instant Access : Start playing immediately without installation

Why Play Toy Factory

Perfect for All Ages

The cute toy theme and simple mechanics make this game suitable for children, while the strategic puzzle elements provide enough challenge for adult players.

Stress-Free Gaming

With its cheerful music, colorful visuals, and heartwarming rescue theme, Toy Factory offers a relaxing gaming experience that helps players unwind.

Completely Free

Enjoy all 45 levels and features without any cost. No hidden fees, no premium content - just pure puzzle fun.

Quick Sessions

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

Competitive Element

The high scores feature adds a competitive aspect, encouraging players to improve their performance and climb the leaderboards.

Frequently Asked Questions (FAQ)