City Dunk - Free Basketball Game

Seele01-Flash
By
City Dunk is an addictive free basketball game that takes the sport to new heights. Guide a winged basketball through endless floating hoops with perfect timing and physics-based gameplay.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "City Dunk". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Visual Style:** "2.5D Toon/Flat Aesthetic." Use a side-scrolling perspective. The look should mimic vector art but realized with 3D primitives. * **Main Character (The Ball):** Create a `SphereGeometry` with a bright orange basketball texture/color. Attach two small white wings (using flattened `BoxGeometry` or custom `BufferGeometry`) to the sides of the ball. The wings must animate (flap rotation) every time the player taps. * **Obstacles (Hoops):** Generate infinite hoops using `TorusGeometry` (white color) positioned at varying heights. Add a semi-transparent, white tapered cylinder below the torus to represent the net. * **Background:** A deep purple/midnight blue gradient background (`0x2a2a50` to `0x1a1a30`). Use multiple layers of silhouettes for a parallax effect: foreground dark trees (conifers), background city skyline silhouettes. * **Lighting:** Use `AmbientLight` for base visibility and a `DirectionalLight` to create soft shadows to give depth to the ball and hoops. * **Mobile Optimization:** Use `OrthographicCamera` for a crisp 2D look. Reuse geometries (InstancedMesh) for the trees and hoops to maintain 60 FPS on mobile devices. ### 2. Audio Requirements * **BGM:** An upbeat, looping Lo-Fi Hip Hop or "Street Basketball" beat. It should be rhythmic to help with timing but not distracting. * **Sound Effects (SFX):** * **Jump/Flap:** A cartoonish "woosh" or wing-flap sound when the screen is tapped. * **Score:** A satisfying "swish" (net sound) combined with a magical chime. * **Collision:** A rubbery bounce sound if the ball hits the rim. * **Game Over:** A referee whistle or a buzzer sound. ### 3. Gameplay Loop * **Core Mechanic:** A "Flappy Bird" style physics mechanic. The ball automatically moves forward (or the world moves backward). Gravity constantly pulls the ball down. * **Interaction:** Tapping applies an upward and slightly forward force (impulse) to the ball. * **Scoring:** The player must guide the ball through the hoops. Passing through a hoop increments the score by 1. Perfect "swish" (not touching the rim) triggers a "Perfect!" floating text and particle confetti. * **Fail State:** The game ends immediately if: 1. The ball touches the ground or flies too high (off-screen). 2. The ball misses a hoop (passes the hoop's x-position without triggering the score collider). 3. The ball hits the *outside* of the rim and falls. ### 4. Mobile Controls & Interaction * **Input Method:** Full-screen touch detection (`touchstart` or `pointerdown`). No virtual buttons; the entire screen is the trigger. * **Feedback:** * **Visual:** The ball creates a faint white trail (ribbon) behind it to visualize the trajectory. * **Haptic:** Trigger `navigator.vibrate(10)` on a successful tap and `navigator.vibrate([50, 50, 50])` on Game Over. * **UI Layout:** * **Score:** Large, bold font centered at the top (safe area compliant). * **Start Screen:** "Tap to Dunk" overlay. * **Game Over:** High Score display and a large "Replay" button (minimum touch target 44x44px). * **Orientation:** Locked to **Portrait Mode** for one-handed play, but responsive design should handle landscape if forced. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About City Dunk

City Dunk is an innovative free basketball game that reimagines the classic sport by taking it to the skies. This physics-based sports game challenges players to guide a winged basketball through an endless series of floating hoops, creating an addictive gameplay experience that's both simple to learn and difficult to master. With a solid 4.3/5 rating from players, City Dunk has proven to be a crowd favorite in the mobile sports gaming category.

Core Features

Endless Basketball Action

City Dunk offers unlimited gameplay with no finish line - your goal is to achieve the highest score possible by successfully dunking through consecutive hoops. The game continues indefinitely until you miss a single hoop, making every shot count and creating intense pressure as your streak grows longer.

Physics-Based Gameplay

The game features realistic physics mechanics that make each shot feel authentic. The winged basketball responds naturally to your controls, requiring players to master timing, trajectory, and momentum to successfully navigate through the floating hoops.

Free-to-Play Experience

City Dunk is completely free to play with no hidden costs or premium content barriers. Jump straight into the action without any downloads or payments required.

Cross-Platform Compatibility

Designed as an HTML5 game, City Dunk works seamlessly across all devices: - Mobile devices : Tap-to-play controls optimized for touchscreens - Desktop computers : Mouse-controlled gameplay for precise movements - Tablets : Responsive design that adapts to any screen size

High Score Competition

Compete with players worldwide through the integrated high score system. Track your personal best and challenge yourself to beat previous records while comparing your skills with the global community.

Game Gameplay

The Challenge

In City Dunk, you control a basketball with wings as it soars through the air toward floating hoops. The objective is simple: successfully dunk through as many consecutive hoops as possible without missing. However, the physics-based mechanics make this deceptively challenging.

Scoring System

Your score increases with each successful dunk, and the longer your streak continues, the higher your final score becomes. The game rewards consistency and precision, making every shot a crucial decision that could make or break your record-setting run.

Progressive Difficulty

While the core mechanics remain consistent, the psychological pressure increases as your streak grows longer. The fear of losing your progress creates natural tension that keeps players engaged and coming back for "just one more try."

Operation Guide

Mobile Controls

On smartphones and tablets: - Tap the screen to make the winged basketball adjust its flight path - Time your taps carefully to guide the ball through each hoop - Watch the physics - each tap affects the ball's momentum and direction

Desktop Controls

On computers: - Use your mouse to control the basketball's movement - Left-click to gently bounce and guide the ball toward the hoops - Precise movements are key to maintaining control and accuracy

Success Tips

  • Practice timing - Learn the rhythm of the ball's movement
  • Watch the trajectory - Predict where the ball will go before making adjustments
  • Stay calm - Don't rush your shots, especially during long streaks
  • Focus on consistency - Aim for the center of each hoop for the highest success rate

Why Play City Dunk

Perfect for Quick Gaming Sessions

City Dunk is ideal for short gaming breaks or extended play sessions. The instant-start gameplay means you can jump into action immediately, while the endless format provides hours of entertainment for dedicated players.

Skill Development

The game helps improve: - Hand-eye coordination through precise timing requirements - Spatial awareness via physics-based ball control - Patience and focus during high-pressure streak situations - Quick decision-making under pressure

Universal Appeal

Suitable for all ages and skill levels, City Dunk appeals to: - Basketball fans looking for a unique twist on their favorite sport - Casual gamers seeking addictive, easy-to-learn gameplay - Mobile gaming enthusiasts who enjoy physics-based challenges - Competitive players aiming to top leaderboards

No Commitment Required

As a browser-based game, City Dunk requires no downloads, installations, or account creation. Simply open your browser and start playing immediately, making it perfect for trying out without any commitment.

Frequently Asked Questions (FAQ)