Single Line: Drawing Puzzle

Seele01-Flash
By
Single Line: Drawing Puzzle is an addictive brain-training game that challenges you to complete intricate shapes using only one continuous line. Test your logic, creativity, and spatial reasoning skills through increasingly complex puzzles.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Single Line: Drawing Puzzle". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: A minimalist, "Neon-Cozy" aesthetic. Use a deep, rich purple background (hex: `#2e003e`) to contrast with bright neon puzzle elements. * **3D Elements**: * **The Puzzle Graph**: Represent "Nodes" (vertices) as glowing spheres and "Lines" (edges) as tubes (`TubeGeometry` or thick lines). * **State Colors**: * *Unvisited Path*: Dim, translucent pink (`#ff007f`, opacity 0.3). * *Active/visited Path*: Bright, glowing neon green (`#00ff00`) or cyan. * *Current Node*: A pulsing sphere indicating the player's current position. * **Effects**: Implement a Post-Processing Bloom effect (`UnrealBloomPass`) to make the active lines and nodes glow intensely. * **Mobile Optimization**: Use low-polygon geometries for the spheres. Bake lighting or use basic materials (`MeshBasicMaterial` or `MeshLambertMaterial`) to maintain high FPS on mobile devices. Ensure the camera is an Orthographic Camera to keep the 2D logic clear while utilizing 3D assets. ### 2. Audio Requirements * **Background Music (BGM)**: A relaxing, ambient Lo-Fi or Ethereal Synth track. It should be repetitive but non-intrusive to aid concentration. * **Sound Effects (SFX)**: * *Node Connection*: A satisfying, soft "pop" or "bubble" sound when the finger successfully connects to a new node. * *Drawing*: A subtle continuous hum that changes pitch slightly as the line lengthens. * *Level Complete*: A harmonious chord or upward harp glissando. * *Invalid Move*: A soft, dull thud or low-pitch vibration sound if the player tries to retrace a line. ### 3. Gameplay Loop * **Data Structure**: Define levels as Graphs (sets of Nodes and Edges). * **Core Mechanic**: 1. **Start**: The player taps any valid starting node (or a pre-defined start node) to begin. 2. **Draw**: The player drags their finger to an adjacent node. 3. **Validation**: If an edge exists between the current node and the target node, and that edge has *not* been visited yet, the move is valid. The line fills with the "Active" color. 4. **Restriction**: Players cannot lift their finger (or if they do, the path pauses at the last node). Players cannot traverse an edge twice. * **Win Condition**: All edges in the graph are illuminated (visited). Trigger a particle explosion and a "Level Complete" UI overlay. * **Lose/Reset**: If the player is stuck (on a node with no unvisited edges leading out) but the puzzle is not finished, show a "Reset" button. ### 4. Mobile Controls & Interaction * **Touch Input**: Implement `touchstart`, `touchmove`, and `touchend` event listeners mapped to a Raycaster. * **Snap-Assist System**: Since mobile precision varies, implement a "magnetic" feel. If the user's finger is within a certain radius of a valid adjacent node, the line should visually "snap" to that node automatically. * **Orientation**: Portrait mode is preferred for one-handed play. * **Haptic Feedback**: Use the `window.navigator.vibrate(50)` API to trigger a short vibration whenever a node is successfully connected. * **UI Layout**: * Place a large "Reset" button at the bottom of the screen (easy thumb reach). * Level counter at the top. * Ensure all touch targets are at least 44x44 pixels. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Single Line: Drawing Puzzle is a captivating logic-based puzzle game that combines artistic creativity with mathematical precision. This clever brain-teaser challenges players to draw complete shapes using a single, unbroken line without lifting their finger or retracing any path. With its colorful 2D graphics and progressively challenging levels, the game offers an engaging mental workout that's both relaxing and intellectually stimulating.

The game features vibrant neon-colored shapes against a purple background, creating a visually appealing experience that's easy on the eyes during extended play sessions. From simple geometric forms like triangles and squares to complex interconnected designs, each puzzle requires careful planning and strategic thinking.

Core Features

Progressive Difficulty System

The game starts with simple shapes that introduce the core mechanics, then gradually increases complexity as you advance. Early levels feature basic geometric forms, while later stages present intricate designs with multiple interconnected elements that truly test your problem-solving abilities.

Brain Training Benefits

Single Line: Drawing Puzzle serves as an excellent brain training tool, improving: - Spatial reasoning skills - Visualizing paths and connections - Logical thinking - Planning optimal routes through complex shapes - Problem-solving abilities - Finding creative solutions to challenging puzzles - Focus and concentration - Maintaining attention during detailed planning

Relaxing Gameplay Experience

Despite its challenging nature, the game maintains a calm, stress-free atmosphere. The smooth drawing mechanics, soothing color palette, and absence of time pressure create an ideal environment for mindful puzzle-solving and mental relaxation.

Accessible Design

The game's simple mouse-based controls make it accessible to players of all ages and skill levels. No complex button combinations or timing requirements - just pure logic and creativity.

Game Mechanics

The core challenge lies in planning your path before you begin drawing. Unlike traditional drawing games, you must visualize the entire solution mentally before executing it. This requirement transforms simple shape completion into a sophisticated puzzle-solving exercise.

Each level presents a unique shape outlined in bright colors. Your task is to trace this outline completely using one continuous line. The challenge intensifies as shapes become more complex, featuring: - Multiple connection points - Overlapping elements - Intricate geometric patterns - Abstract artistic designs

Operation Guide

Controls are intuitive and responsive: - Mouse Control : Hold and drag the left mouse button to draw your line - Path Planning : Study the shape carefully before beginning - Precision Drawing : Maintain steady movement to follow the outline accurately - Problem-Solving : If you get stuck, restart the level and try a different approach

Strategy Tips : 1. Always analyze the entire shape before starting 2. Look for natural starting and ending points 3. Count connection points to determine if a solution exists 4. Practice on simpler shapes to develop your spatial reasoning

Why Play This Game

Perfect for Mental Exercise : Single Line: Drawing Puzzle offers an excellent way to exercise your brain during short breaks or extended relaxation sessions. Unlike action games that require quick reflexes, this puzzle game rewards careful thought and strategic planning.

Stress-Free Entertainment : The game's calming visual design and absence of time limits create a peaceful gaming environment. It's perfect for unwinding after a busy day while still keeping your mind engaged.

Universal Appeal : Whether you're a puzzle enthusiast, an art lover, or someone looking to improve cognitive abilities, this game offers something valuable. The simple concept with deep strategic elements appeals to casual players and serious puzzle solvers alike.

No Pressure, Pure Fun : Progress at your own pace without worrying about scores, timers, or competition. Focus entirely on the satisfaction of solving each puzzle and the mental clarity that comes with successful problem-solving.

Frequently Asked Questions (FAQ)