Longcat - Cat Snake Puzzle Game

Seele01-Flash
By
Longcat is an innovative puzzle game that combines the classic snake gameplay with strategic thinking. Guide a growing cat's body to fill empty spaces while avoiding obstacles and preventing the tail from catching the head.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Longcat Puzzle**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** Adorable Low-poly Voxel aesthetic, inspired by Fancade style. Use bright, warm colors (Primary Yellow for the cat, Orange accents). * **The Cat:** * **Head:** A rounded cube mesh with a cute face texture (two black eyes, pink nose, white snout) similar to the reference image. * **Body:** The body should be composed of individual cube segments that instantiate dynamically as the cat moves. * **Tail:** A simple rounded cap segment. * **The Grid/Level:** * A grid-based floor (e.g., 6x6 or 8x8) using alternating light brown/beige tiles to clearly delineate movement space. * **Obstacles:** Static block meshes (e.g., rocks or darker crates) placed on specific grid coordinates that the cat can slide against. * **Camera:** Use an **Orthographic Camera** positioned at a high angle (isometric view) to provide a clear, distortion-free view of the puzzle layout. * **Optimization:** Use `THREE.InstancedMesh` for the floor tiles and body segments to ensure 60fps performance on mobile browsers. ### 2. Audio Requirements * **BGM:** A playful, "sneaky" pizzicato string or chiptune track that loops seamlessly. It should feel "thinking-oriented" but lighthearted. * **Sound Effects (SFX):** * **Slide:** A quick, soft "zip" or "slide" sound when the cat extends. * **Impact:** A soft "thump" or "boing" when the cat hits a wall/obstacle. * **Win:** A cheerful "Meow" combined with a victory chime. * **Fail/Stuck:** A confused/sad "Mrrrow?" sound. ### 3. Gameplay Loop * **Core Mechanic (The Twist):** Unlike classic Snake, the cat does *not* move one square at a time. When the player chooses a direction, the cat's head **slides continuously** in that direction, leaving a trail of body segments behind, until it hits an obstacle (wall, rock, or its own body). * **Objective:** The goal is to fill **100% of the walkable grid tiles** with the cat's body. * **Win Condition:** When every empty tile on the map is occupied by a cat segment. * **Fail Condition:** If the cat comes to a stop and there are still empty tiles, but the cat is trapped (no valid moves available in any direction), the level is lost. * **Logic:** Implement a grid system array (e.g., 0 = empty, 1 = obstacle, 2 = cat). The movement function must calculate the distance to the nearest obstacle in the chosen vector and "fill" the cells in between instantly or via a quick animation. ### 4. Mobile Controls & Interaction * **Touch Controls:** Implement a **Swipe Detection System** (TouchStart / TouchEnd coordinates). * Swipe Up/Down/Left/Right to trigger movement. * Add a small threshold (e.g., 30px) to prevent accidental micro-touches. * **Orientation:** Force or design for **Portrait Mode** (Vertical) layout to fit phone screens comfortably. * **UI Elements:** * **Reset Button:** A large, accessible circular button (bottom right) with a "Refresh" icon, minimum 44x44px touch target. * **Level Progress:** A simple text display at the top center (e.g., "Level 1"). * **Feedback:** * **Visual:** When the cat hits a wall, add a small "squash" scale animation to the head for juice. * **Haptic:** Trigger `navigator.vibrate(50)` (light vibration) when the cat hits a wall/stops moving. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About Longcat

Longcat is a captivating puzzle game that puts a delightful twist on the classic snake game formula. This charming pixel-art adventure challenges you to fill empty spaces with an ever-growing cat's body while navigating through increasingly complex puzzles. The game's simple yet addictive mechanics make it perfect for puzzle enthusiasts and casual gamers alike.

The game features adorable pixel-art graphics with a bright yellow cat protagonist that grows longer with each move. The minimalist design focuses on pure puzzle-solving fun, making it accessible to players of all ages.

Core Features

Strategic Puzzle Mechanics

Unlike traditional snake games, Longcat requires careful planning and strategic thinking. The cat's body continues growing until it hits an obstacle, meaning every move must be calculated to avoid trapping yourself.

Progressive Difficulty

Each level presents new challenges with different layouts, obstacles, and space configurations. As you progress, puzzles become more complex, requiring advanced planning and spatial awareness.

Pixel Art Charm

The game features delightful retro-style pixel graphics with a cute cat character that brings personality to every puzzle. The clean, colorful design makes gameplay clear and enjoyable.

Cross-Platform Accessibility

Play seamlessly across all devices - desktop computers, tablets, and smartphones all support the game through web browsers, with no downloads required.

Game Mechanics

Growing Cat Body

The core mechanic revolves around controlling a cat whose body grows continuously in the direction you choose. The challenge lies in planning your path to fill all available space without the tail catching up to the head.

Obstacle Navigation

Various blocks and platforms serve as obstacles that stop the cat's growth. Use these strategically to control your path and create the perfect route through each puzzle.

Space Optimization

Success requires filling every available space efficiently. Think ahead to ensure you can complete the puzzle without creating impossible situations.

Operation Guide

Basic Controls

  • WASD Keys : Move the cat up, left, down, and right
  • Arrow Keys : Alternative movement controls for different preferences
  • Click and Drag : Touch-friendly controls for mobile devices and tablets
  • Strategic Planning : Think several moves ahead before committing to a direction

Winning Strategy

The key to success is visualizing the complete path before making your first move. Consider how the cat's body will fill the space and plan your route to avoid dead ends.

Why Play Longcat

Perfect Brain Training

Longcat exercises spatial reasoning, strategic planning, and problem-solving skills. Each puzzle requires careful analysis and forward thinking, making it an excellent brain training tool.

Stress-Free Gaming

With no time pressure or lives system, you can take your time to think through each puzzle. The relaxing gameplay makes it perfect for unwinding while still engaging your mind.

Instant Accessibility

No downloads, no installations, no accounts required. Simply open your web browser and start playing immediately on any device.

Family-Friendly Fun

The cute cat theme and non-violent puzzle mechanics make Longcat suitable for players of all ages. Share the fun with family members who enjoy brain teasers.

Endless Replayability

With multiple solutions possible for many puzzles, you can replay levels to find more efficient paths or challenge yourself with self-imposed restrictions.

Frequently Asked Questions (FAQ)