Caterpillars - Color Matching Puzzle Game

Seele01-Flash
By
Caterpillars is a charming color-matching puzzle game where you guide adorable caterpillars to their matching cocoons. With intuitive drag-and-drop controls and progressively challenging levels, 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 "Caterpillars". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Create a vibrant, cartoonish, low-poly aesthetic similar to the reference image. Use bright, saturated colors (e.g., Hot Pink `#FF0066` for the character, Lime Green `#99CC33` for the background). * **The Caterpillar**: Construct the caterpillar using a series of `SphereGeometry` or rounded `CylinderGeometry` segments. * **Head**: Must have two large "googly eyes" (white spheres with smaller black pupils). * **Body**: 4-6 connected spheres. Add small black spheres at the base of each segment to represent "feet". * **Animation**: Implement a "squash and stretch" or sinusoidal wave animation when the caterpillar moves between grid cells to make it feel organic and jelly-like. * **The Environment**: * **Grid Board**: Use a checkerboard pattern for the ground (PlaneGeometry) using two slightly different shades of green to clearly denote the gameplay grid. * **Cocoons (Goals)**: Create Torus geometries (donut shapes) representing the holes/cocoons. These must be color-coded to match specific caterpillars. * **Obstacles**: Simple cubes or stones (Low-poly rocks) that block the path. * **Optimization**: Use `InstancedMesh` for the ground grid to ensure high FPS on mobile devices. Limit real-time shadows; use a simple `DirectionalLight` and `AmbientLight` setup. ### 2. Audio Requirements * **BGM**: Generate a placeholder for a "Curious & Playful" track—think pizzicato strings, marimbas, or light woodwinds. It should be looping and relaxing. * **Sound Effects (SFX)**: * **Select**: A high-pitched "pop" or "bloop" when touching the caterpillar. * **Move**: A soft "squish" or sliding sound for each grid step. * **Success**: A magical "harp glissando" or satisfying "thud" when the caterpillar enters the cocoon. * **Invalid Move**: A subtle "spring boing" or vibration sound if the player tries to drag into a wall. ### 3. Gameplay Loop * **Grid System**: The game logic must operate on a discrete 2D grid array (e.g., 8x10). * **Mechanics**: * **Bidirectional Movement**: The player can drag the **Head** to pull the body forward, OR drag the **Tail** to pull the body backward (effectively making the tail the new head). * **Snake Logic**: When the head moves to a new tile, segment 2 moves to segment 1's old position, segment 3 to segment 2's, etc. * **Collision**: The caterpillar cannot move into walls, obstacles, or its own body segments. * **Win Condition**: The level is cleared when **all** caterpillars on the board have fully entered their matching colored cocoons. * *Visual Reward*: When a caterpillar enters a cocoon, spawn a simple particle effect (butterflies or sparkles) and remove the mesh from the scene. ### 4. Mobile Controls & Interaction * **Input System**: Implement a **Raycaster** solution for touch events. * **Selection**: Detect `touchstart` on the Caterpillar's Head or Tail. Highlight the selected end (e.g., slightly scale up or emission material). * **Drag Logic**: Calculate the vector between `touchstart` and current `touchmove`. If the drag distance exceeds a threshold (e.g., 20px) in a cardinal direction (Up, Down, Left, Right), trigger the move to the adjacent grid cell. * **Feedback**: * **Haptic**: Trigger `navigator.vibrate(50)` on a successful move step. * **Visual Guide**: When dragging, show a semi-transparent "ghost" or arrow indicator on the adjacent tile to show where the caterpillar will move. * **Orientation**: Force the camera to a fixed Top-Down or slight Isometric view (`OrthographicCamera` is preferred for puzzle precision) tailored for **Portrait Mode** (vertical alignment) to suit one-handed mobile play. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Caterpillars is a delightful puzzle game that combines relaxing gameplay with strategic thinking. In this colorful adventure, you'll guide cute caterpillars across beautifully designed boards to help them reach their matching cocoons. Each successful match brings these adorable creatures one step closer to their transformation into beautiful butterflies.

The game features charming 3D graphics with vibrant colors and smooth animations that make every level a visual treat. Whether you're looking for a quick brain teaser or a longer puzzle session, Caterpillars offers the perfect balance of challenge and relaxation.

Core Features

Intuitive Drag-and-Drop Gameplay

The game's simple yet engaging mechanics make it accessible to players of all skill levels. Simply drag caterpillars by their head or tail to guide them across the board - no complex controls to master.

Colorful Puzzle Challenges

Each level presents a unique board layout with caterpillars that must find their way to matching colored cocoons. The vibrant color palette and cute character designs create an engaging visual experience.

Progressive Difficulty System

Starting with simple layouts, the game gradually introduces obstacles and more complex paths that require strategic thinking. Each new challenge builds upon previous skills while keeping the gameplay fresh and exciting.

Transformative Theme

Witness the magical moment when caterpillars enter their cocoons, preparing for their transformation into butterflies. This nature-inspired theme adds depth and meaning to every puzzle solved.

Gameplay Mechanics

The core objective is straightforward yet satisfying: match each caterpillar with its corresponding colored cocoon. Players must carefully plan their moves, as caterpillars can only be pulled from their head or tail, creating interesting path-finding challenges.

As you progress through levels, you'll encounter: - Multiple caterpillars that must be moved in the correct sequence - Obstacles that block certain paths - Complex board layouts requiring strategic planning - Limited space that demands efficient movement patterns

Operation Guide

Basic Controls

  • PC Players : Click and drag using the left mouse button
  • Mobile Players : Touch and drag with your finger
  • Movement : Pull caterpillars from either their head or tail end
  • Objective : Guide each caterpillar to its matching colored cocoon

Winning Strategy

  1. Analyze the board before making your first move
  2. Identify color matches between caterpillars and cocoons
  3. Plan your sequence - some caterpillars may block others' paths
  4. Use the space efficiently to avoid getting stuck
  5. Think ahead - consider how each move affects other caterpillars

Why Play Caterpillars

Caterpillars stands out in the puzzle game genre by offering a perfect blend of relaxation and mental stimulation. The game's nature-inspired theme creates a peaceful atmosphere while the strategic gameplay keeps your mind engaged. It's ideal for:

  • Stress relief after a long day
  • Brain training with logical thinking challenges
  • Family gaming - suitable for all ages
  • Quick entertainment during breaks
  • Extended play sessions with hundreds of levels

The game runs smoothly on both desktop and mobile devices, making it accessible wherever you are. With no time limits or pressure, you can solve puzzles at your own pace while enjoying the charming animations and satisfying gameplay mechanics.

Frequently Asked Questions (FAQ)