Dunkbrush - Basketball Line Drawing Game

Seele01-Flash
By
Dunkbrush combines basketball with creative drawing mechanics. Draw strategic lines to guide basketballs into the hoop, unlock colorful drawing tools, and challenge yourself to achieve the highest score possible.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Dunkbrush". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Use a vibrant, 2.5D cartoon aesthetic. The perspective should be orthographic or a fixed front-facing perspective camera to simulate a flat 2D plane but with 3D object depth. * **Background**: A solid, electric blue gradient background (CSS hex suggestion: #2050FF to #4080FF) that is static to maintain focus on the gameplay. * **Key Assets**: * **Basketballs**: Low-poly spheres with a bright orange texture and distinct black lines. Add a slight "toon shader" effect or simple rim lighting to pop against the blue background. * **The Hoop**: A simple red torus (rim) and a white cylindrical mesh (net). The net should shake slightly (vertex displacement) when a ball passes through. * **The "Brush" Lines**: Procedurally generated `TubeGeometries` or `MeshLine` geometries that appear dynamically where the user drags their finger. They should look like thick, white chalk or paint strokes. * **Particles**: When a ball enters the hoop, emit a burst of confetti or star particles. When a ball hits a drawn line, emit small dust particles at the impact point. * **Performance**: Use instanced mesh rendering for the basketballs if multiple appear simultaneously. Ensure the "drawing line" geometry is optimized by merging vertices or limiting segment count to prevent memory leaks on mobile devices. ### 2. Audio Requirements * **BGM (Background Music)**: A looped, upbeat "Future Bass" or "Lo-Fi Hip Hop" track. It should be energetic but not distracting, featuring a solid beat to keep the rhythm. * **Sound Effects (SFX)**: * **Drawing**: A satisfying "scribble" or "marker on whiteboard" sound that plays while the user is dragging their finger. * **Bounce**: A soft "thud" sound when the ball hits a drawn line (pitch varied slightly per hit to avoid monotony). * **Score (Swish)**: A crisp "swish" net sound combined with a "ding" coin collection sound. * **Game Over**: A descending whistle or a "buzzer" sound. ### 3. Gameplay Loop * **Core Mechanic**: Physics-based puzzle. Basketballs spawn from the top of the screen at varying trajectories. The player cannot control the balls directly. * **Player Action**: The player draws physical barriers (lines) on the screen. These lines act as static physics bodies (colliders) that the balls bounce off of. The goal is to redirect the balls into the hoop at the bottom center. * **Line Limit**: Drawn lines should have a "lifespan" (e.g., they disappear after 3 seconds or after being hit 3 times) or a maximum length limit per level to increase difficulty. * **Scoring**: +1 point for every successful dunk. +2 points for a "clean" swish (not touching the rim). Spawn coins occasionally that the ball must touch to collect. * **Fail State**: If a ball falls off the bottom of the screen without going through the hoop, the game ends immediately. Show a "High Score" and a "Restart" button. ### 4. Mobile Controls & Interaction * **Control Scheme**: One-finger touch control. * `touchstart`: Begin drawing the line geometry. * `touchmove`: Extend the line geometry following the finger's path. * `touchend`: Finalize the physics body for that line segment. * **Orientation**: **Portrait Mode (Vertical)** is mandatory for one-handed play. * **Physics Feedback**: Use `navigator.vibrate(10)` (haptic feedback) whenever a ball bounces off a user-drawn line to provide tactile weight. * **UI/UX**: * Score counter at the top center (large, readable font). * "Restart" button must be large (at least 60x60 pixels) and placed in the center of the screen upon Game Over. * Ensure the drawing raycaster ignores UI elements so the user doesn't accidentally draw lines while clicking buttons. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Dunkbrush is an innovative basketball skill game that challenges your creativity and strategic thinking. Instead of traditional shooting mechanics, you draw lines to guide basketballs into the basket. This unique gameplay combines the excitement of basketball with puzzle-solving elements, creating an engaging experience that tests both your spatial awareness and drawing skills.

The game features a clean, colorful design with smooth physics that make every ball trajectory feel realistic and satisfying. As you progress, you'll collect coins that unlock new drawing colors, adding a personalization element to your gameplay experience.

Core Features

Creative Drawing Mechanics

Unlike traditional basketball games, Dunkbrush lets you control the ball's path by drawing custom lines. This innovative approach requires you to: - Analyze ball trajectory : Quickly assess where the ball is heading - Plan strategic paths : Draw lines that redirect the ball toward the basket - Master physics : Understand how drawn lines affect ball movement - Adapt quickly : Each level presents new challenges requiring different solutions

Progression and Customization

The game rewards successful shots with coins that unlock exciting features: - Multiple drawing colors : Personalize your lines with various color options - High score challenges : Compete against yourself to achieve better results - Skill development : Improve your spatial reasoning and quick-thinking abilities - Endless gameplay : Continue playing to master increasingly difficult shots

Accessible Yet Challenging

Dunkbrush strikes the perfect balance between accessibility and challenge: - Simple controls : Just click and drag to create lines - Intuitive mechanics : Easy to learn but difficult to master - Progressive difficulty : Start easy and face more complex scenarios - Instant feedback : See immediately how your drawings affect ball movement

Gameplay Mechanics

The core gameplay revolves around predicting and controlling basketball trajectories through strategic line drawing:

  1. Observe : Watch the basketball's initial path and speed
  2. Plan : Determine where to place your drawn line for optimal redirection
  3. Draw : Click and drag to create a line that will guide the ball
  4. Score : Successfully direct the ball into the basketball hoop
  5. Collect : Gather coins from successful shots
  6. Customize : Use coins to unlock new drawing colors

Operation Guide

Mastering Dunkbrush requires understanding the simple yet effective control system:

  • Mouse Controls : Click and drag your mouse to create guiding lines
  • Line Placement : Position lines strategically to redirect ball trajectory
  • Timing : Draw lines at the right moment for maximum effectiveness
  • Physics : Consider ball speed and momentum when placing lines

The game responds instantly to your input, making it easy to experiment with different line angles and positions. Success comes from understanding how the ball interacts with your drawn lines and anticipating the best placement for each unique situation.

Why Play This Game

Dunkbrush offers a refreshing take on basketball gaming that appeals to puzzle lovers and sports fans alike:

For Puzzle Enthusiasts : The game challenges your problem-solving skills with physics-based puzzles that require creative thinking and spatial awareness.

For Casual Gamers : Simple mouse controls make it accessible to players of all skill levels, while the progression system keeps you engaged long-term.

For Basketball Fans : Experience basketball from a unique perspective that emphasizes strategy and precision over traditional shooting mechanics.

Perfect for Short Sessions : Each attempt takes only seconds, making it ideal for quick gaming breaks or longer focused play sessions.

The combination of creative freedom, skill-based challenges, and satisfying basketball action creates a gaming experience that's both relaxing and mentally stimulating. Whether you're looking to improve your spatial reasoning or simply want an entertaining way to pass time, Dunkbrush delivers engaging gameplay that grows more rewarding as you develop your skills.

Frequently Asked Questions (FAQ)