Lineum - Line Drawing Puzzle Game

Seele01-Flash
By
Lineum is an engaging line-drawing puzzle game that challenges players to turn all tiles into green grass by creating continuous paths. Perfect for puzzle lovers seeking a mental workout.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Lineum: The Garden Path**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: A stylized, "Low-poly Nature" aesthetic. The scene should look like a floating island or a raised garden bed against a calming gradient sky (light blue to soft white). * **Grid System (The Tiles)**: * Use `THREE.InstancedMesh` for the grid tiles to ensure high performance (60 FPS) on mobile devices. * **State A (Unvisited)**: "Dry Soil" texture – matte brown, slightly rough geometry. * **State B (Visited)**: "Lush Grass" texture – vibrant green. When a tile is activated, it should trigger a transition animation: either a mechanical "flip" (rotating 180 degrees) or a "growth" effect (scaling up grass blades). * **The Cursor/Player**: A glowing particle orb or a small stylized water droplet that leads the line. It leaves a trail (using `THREE.Line` or a custom trail mesh) connecting the center of visited tiles to visualize the path clearly. * **Lighting**: Soft ambient light combined with a directional light (sun) casting soft shadows to give depth to the tiles. ### 2. Audio Requirements * **BGM**: A relaxing, Zen-inspired track (Lo-fi or acoustic guitar) that loops seamlessly. It should be non-intrusive to aid concentration. * **Sound Effects (SFX)**: * **Move/Flip**: A satisfying "pop" or "leaf rustle" sound (ASMR quality) each time a tile turns green. Pitch the sound up slightly for each subsequent move in a combo to create a sense of progression. * **Invalid Move**: A soft, low-frequency "thud" or muted pluck if the player tries to cross their own line or move diagonally. * **Level Complete**: A bright, harmonious chime or major chord arpeggio. * **UI Interactions**: crisp "clicks" for buttons (Reset, Hint). ### 3. Gameplay Loop * **Core Mechanic**: The game is a "One-Stroke" puzzle (Hamiltonian path variant). The player must fill every tile in the grid. * **Rules**: 1. **Start**: The player touches any "Dirt" tile to begin (or a pre-defined start tile for harder levels). 2. **Draw**: The player drags their finger to move to adjacent tiles (Up, Down, Left, Right). No diagonal movement. 3. **Constraint**: The line cannot cross itself. A tile cannot be visited twice. 4. **Win Condition**: All traversable tiles in the level are turned to "Grass". 5. **Lose/Stuck**: If the player reaches a dead end but "Dirt" tiles remain, they must hit "Reset" or "Undo". * **Level Elements**: * **Standard Tile**: Becomes grass upon entry. * **Obstacle (Rock)**: A static mesh that blocks the path. * **Hint System**: A button that momentarily highlights the first 3-5 correct moves of the solution. ### 4. Mobile Controls & Interaction * **Input Method**: **"Drag-to-Draw"** system. * Implement a Raycaster that tracks touch/mouse movement on the grid plane. * As the player drags across a boundary from the current tile to a valid neighbor, the move executes automatically. This feels smoother than tapping individual cells. * **Camera**: Use an **Orthographic Camera** angled at roughly 45 degrees (isometric view) to ensure the grid is readable and touch targets are consistent across the screen. * **Haptic Feedback**: Trigger a light vibration (using `window.navigator.vibrate(10)`) every time a tile is successfully flipped. This is crucial for tactile satisfaction on mobile. * **UI Layout**: * **Portrait Mode**: Game grid in the center. "Level Counter" at the top. Large, thumb-friendly buttons (Reset, Undo, Hint) at the bottom (minimum touch target 48x48px). * **Responsiveness**: The grid must scale to fit the width of the device with a safe margin. ### 5. Technical Constraints * Ensure the renderer handles `pixelRatio` correctly for sharp visuals on high-DPI mobile screens. * Handle `touchstart` and `touchmove` events with `event.preventDefault()` to stop the browser page from scrolling while playing. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Lineum is a captivating puzzle game that combines simple mechanics with increasingly challenging gameplay. With a solid 3.3/5 rating from over 120 players, this brain teaser has proven its ability to engage puzzle enthusiasts of all skill levels. The game's core concept is deceptively simple: draw a continuous line to flip tiles and turn them all green.

Core Features

Simple Yet Challenging Gameplay

Lineum offers the perfect balance of accessibility and difficulty. While anyone can understand the basic mechanics within seconds, mastering the advanced levels requires strategic thinking and careful planning.

Mobile-Friendly Design

Optimized for both desktop and mobile devices, you can enjoy Lineum anywhere. The intuitive mouse controls on desktop and touch controls on mobile ensure smooth gameplay across all platforms.

Progressive Difficulty

Start with simple grids and work your way up to complex puzzles that will test your spatial reasoning and logical thinking skills. Each level presents a unique challenge that builds upon previous concepts.

Hint System

Stuck on a particularly challenging puzzle? The built-in hint system helps you get started by suggesting the optimal starting position for your line.

Completely Free

Enjoy unlimited gameplay without any cost. No downloads, no subscriptions - just pure puzzle-solving fun directly in your browser.

Game Mechanics

Line Drawing Rules

The beauty of Lineum lies in its straightforward yet restrictive rules: - Draw one continuous line across the grid - Cannot cross your own line path - No diagonal movements allowed - Cannot traverse the same path twice - Must flip all tiles to green to complete the level

Strategic Planning Required

Success in Lineum depends on choosing the correct starting cell. One wrong move can make a level impossible to complete, encouraging players to think several steps ahead before making their first move.

Operation Guide

Desktop Controls: - Use your mouse to click and drag, creating the continuous line path - Click the hint button when you need guidance on where to start - Navigate menus with mouse clicks

Mobile Controls: - Touch and drag to draw your line path - Tap the hint button for assistance - All menu interactions use simple touch controls

Why Play Lineum

Perfect Brain Training

Lineum serves as an excellent mental exercise, improving spatial reasoning, logical thinking, and problem-solving skills. It's like a gym workout for your brain, but much more entertaining.

Stress-Free Gaming

Unlike action games that demand quick reflexes, Lineum allows you to take your time and think through each move. This makes it perfect for relaxation while still providing mental stimulation.

Suitable for All Ages

With its all-ages content rating, Lineum is appropriate for children, adults, and seniors alike. It's an ideal game for family puzzle time or solo brain training sessions.

No Commitment Required

As a browser-based HTML5 game, Lineum requires no downloads or installations. You can start playing immediately and stop whenever you want, making it perfect for quick mental breaks or extended puzzle sessions.

Frequently Asked Questions (FAQ)