Swipe Basketball

Seele01-Flash
By
Swipe Basketball is an addictive online basketball shooting game that challenges your precision and timing. Score as many baskets as possible with intuitive swipe controls, but be careful - every miss costs you a ball!

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "Swipe Basketball". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style**: Clean, vibrant, and casual 3D aesthetic. Use a bright, semi-realistic style similar to modern casual mobile sports games. * **Key Assets**: * **The Ball**: A standard orange basketball with realistic texture mapping (bumps/grooves) but optimized geometry (low-poly sphere). * **The Hoop**: A metal rim with a dynamic net cloth simulation (simplified for mobile performance) or a rigged mesh that reacts when the ball passes through. The backboard should be transparent or stylized acrylic. * **Environment**: An urban street court or a stylized indoor gymnasium. The background should be slightly blurred (depth of field effect) to focus attention on the hoop. * **UI**: Large, bold, cartoony fonts (referencing the orange text in the provided image). A score counter at the top center and a "Balls Remaining" indicator (visualized as ball icons) at the top left. * **Performance Optimization**: Use baked shadows for static objects (hoop stand). Use a simple shadow blob for the ball's shadow on the ground to save rendering costs. Limit dynamic lights to one key directional light. ### 2. Audio Requirements * **BGM**: An energetic, looping hip-hop instrumental track with a funky bassline and light percussion to set an urban street basketball mood. * **Sound Effects (SFX)**: * **Swipe**: A sharp "whoosh" sound varying in pitch based on swipe speed. * **Bounce**: A realistic rubber-on-concrete thud. * **Rim Hit**: A metallic "clank" sound. * **Net Swish**: A satisfying "swish" sound for perfect shots (critical for player gratification). * **Score**: A cheering crowd effect or an electronic chime. * **Game Over**: A referee whistle blow. ### 3. Gameplay Loop * **Core Mechanic**: The player views the hoop from a fixed perspective (slightly below and in front). A basketball spawns at a random position at the bottom of the screen. * **Shooting**: The player swipes up to shoot. The trajectory is calculated based on the angle and speed of the swipe. Physics (gravity, restitution) must be tuned to feel snappy but fair. * **Progression**: * **Streak System**: Consecutive baskets increase the score multiplier (x2, x3) and add visual effects (balls on fire). * **Difficulty**: After a certain score, the hoop should start moving slowly (horizontally) to increase difficulty. * **Win/Loss Condition**: The player starts with a fixed number of lives (e.g., 3 balls). Missing a shot removes a life. Making a "clean shot" (swish without touching the rim) might restore a life or grant bonus points. The game ends when lives reach zero. ### 4. Mobile Controls & Interaction * **Input Handling**: Implement `Touch` events (`touchstart`, `touchmove`, `touchend`) specifically for mobile. Map mouse events for desktop testing as a fallback. * **Swipe Logic**: * Calculate vector from `touchstart` to `touchend`. * **Sensitivity**: Add a multiplier to the Z-axis force so the user doesn't have to swipe the entire screen length to reach the hoop. * **Curve**: Allow for slight curve shots if the swipe has a horizontal arc. * **Orientation**: Portrait mode (Vertical) is mandatory. The camera FOV should be adjusted so the hoop and ball are always visible on narrow screens. * **Haptic Feedback**: Trigger a short vibration (using `navigator.vibrate`) when the ball hits the rim or scores a basket. * **Visual Feedback**: Draw a subtle trail behind the ball during flight to show the path. Display floating text ("Perfect!", "Nice!") near the hoop upon scoring. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Swipe Basketball is a thrilling sports game that brings the excitement of basketball shooting to your browser. This skill-based game challenges players to score as many points as possible by accurately shooting basketballs through the hoop using intuitive swipe mechanics.

The game combines the classic appeal of basketball with modern touch controls, making it perfect for quick gaming sessions or extended practice to improve your virtual shooting skills. With its simple yet challenging gameplay, Swipe Basketball appeals to both casual gamers and basketball enthusiasts.

Core Features

Intuitive Swipe Controls

The game features responsive drag-and-release mechanics that simulate real basketball shooting. Simply click and drag to aim, then release to shoot - the longer your swipe, the more power behind your shot.

Progressive Difficulty

As you score more baskets, the challenge increases, testing your consistency and accuracy. The pressure builds as you try to maintain your streak without missing a shot.

Instant Feedback System

Every shot provides immediate visual and audio feedback, helping you understand your shooting accuracy and adjust your technique for better results.

High Score Challenge

Compete against yourself to beat your personal best score. The game tracks your performance, encouraging you to improve with each session.

Free Browser Gaming

No downloads or installations required - play instantly in any modern web browser on desktop or mobile devices.

Game Mechanics

Shooting System

The core gameplay revolves around precision shooting. Players must judge the angle and power needed to successfully score baskets. Each successful shot earns points, while misses result in losing one of your limited balls.

Ball Management

You start with a limited number of basketballs. Every missed shot costs you a ball, adding tension and requiring careful aim. The game ends when you run out of balls, making every shot crucial.

Scoring Strategy

Success in Swipe Basketball requires finding the right balance between speed and accuracy. While quick shots can rack up points fast, taking time to aim carefully helps avoid costly misses.

Operation Guide

Desktop Controls

  • Left Click + Drag : Aim your shot by clicking and dragging from the ball towards your target
  • Release : Let go of the mouse button to shoot the ball
  • Mouse Movement : Control the angle and power of your shot

Mobile Controls

  • Touch + Drag : Touch the ball and drag towards the hoop to aim
  • Release : Lift your finger to release the shot
  • Gesture Control : Use natural swiping motions for intuitive gameplay

Pro Tips

  • Start with gentle swipes to get a feel for the shooting mechanics
  • Observe the ball's trajectory after each shot to improve your aim
  • Maintain a steady rhythm - rushing often leads to missed shots
  • Practice different angles to handle various hoop positions

Why Play This Game

Perfect for Sports Fans : Basketball enthusiasts can enjoy quick shooting sessions that capture the satisfaction of making perfect shots.

Skill Development : The game helps improve hand-eye coordination and timing through its precision-based gameplay.

Accessible Entertainment : With no complex rules or lengthy tutorials, anyone can start playing immediately and have fun.

Stress Relief : The rhythmic nature of shooting hoops provides a relaxing break from daily activities.

Competitive Element : Challenge yourself to beat high scores, providing motivation for continued play and improvement.

Cross-Platform Fun : Works seamlessly on computers, tablets, and smartphones, letting you practice your shots anywhere.

Whether you're a basketball fan looking for a quick game or someone who enjoys skill-based challenges, Swipe Basketball offers engaging gameplay that's easy to learn but difficult to master.

Frequently Asked Questions (FAQ)