Pool Mania - Classic 8-Ball Pool Game

Seele01-Flash
By
Pool Mania is a classic free online pool game featuring realistic 8-ball billiards gameplay. Play instantly in your browser with intuitive mouse controls and enjoy authentic pool physics.

Prompt

MODEL: Seele01-Flash
Please use Three.js to generate a **mobile-first game** with the theme "**Pool Mania - Arcade 3D Billiards**". Please read the following detailed game design requirements first, and then generate the code accordingly: ### 1. Assets & Environment * **Camera & Perspective:** Setup a PerspectiveCamera angled downwards (approx 45-60 degrees) to show the table depth, but allow the user to orbit slightly. Alternatively, provide a button to toggle between "3D View" and "Top-Down View". * **The Table:** Create a standard pool table with a green felt texture (use noise for detail), dark wooden rails, and 6 visual pockets (black cylinders). The playing surface must be bounded by colliders. * **The Balls:** Generate 16 balls (1 Cue ball - White; 15 Object balls - Colors/Stripes). Use `THREE.MeshStandardMaterial` with high `metalness` (0.2) and low `roughness` (0.1) to simulate the shiny, polished look of billiard balls. Add a dynamic environment map/reflection for realism. * **Lighting:** Use a strong overhead "SpotLight" to simulate a pool hall lamp, casting soft shadows on the table. Add an AmbientLight to ensure rails aren't too dark. * **Optimization:** Keep geometry simple (Cylinders and Boxes for the table). Use instanced mesh if possible for balls, or simple SphereGeometries with moderate segment count (32) for mobile performance. ### 2. Audio Requirements * **BGM:** A smooth, looping "Lounge Jazz" or "Chill Lo-Fi" track to simulate a relaxed casino/bar atmosphere. * **Sound Effects (Synthesized or Placeholder):** * **Collision:** A distinct "Clack" sound (high pitch for hard hits, low for soft) when balls hit each other. * **Rail:** A dull "Thud" when a ball hits the cushion. * **Pocket:** A satisfying "Plop" or "Rattle" when a ball is potted. * **Cue:** A "Whoosh" sound upon releasing the shot. ### 3. Gameplay Loop * **Physics Engine:** Implement a custom, lightweight 2D physics loop (ignoring vertical Y-axis movement for gameplay physics) to handle elastic collisions between circles (balls) and AABB/Line segments (walls). Include friction/deceleration so balls eventually stop. * **Game Mode (Arcade):** The goal is to clear the table in the shortest time or with high scores. * **Scoring:** +100 points for potting a ball. +50 bonus points for consecutive pots (Combo). -50 points for scratching (potting the cue ball). * **Turn Logic:** 1. **Aiming:** Player rotates the cue angle. 2. **Power:** Player sets shot power. 3. **Shooting:** Cue ball is struck. Input is disabled until all balls stop moving. 4. **Reset:** If Cue ball falls in a pocket, respawn it at the starting position. ### 4. Mobile Controls & Interaction * **Control Scheme (Drag-to-Shoot):** * **Aiming:** Touching and dragging anywhere on the screen rotates the cue stick around the cue ball. * **Shooting:** A dedicated UI slider on the right side (or a "Pull back" gesture on the cue stick itself) controls power. Releasing the touch fires the shot. * **Visual Aid (Guideline):** Draw a `THREE.Line` or a dashed raycast line projecting from the cue ball to show the trajectory. If it hits a ball, show a "Ghost Ball" indicating the impact point. * **Orientation:** Force Landscape orientation logic (resize canvas on window resize). * **UI Layout:** * Top Left: Score & Multiplier. * Top Right: Reset/Pause Button (44x44px minimum touch target). * The UI must be overlaid on the 3D canvas (HTML/CSS absolute positioning). * **Feedback:** Add a subtle screen shake (camera jitter) when balls collide at high speeds. Do not ask for clarification. Do not request confirmation. Directly execute the generation task based on the given instructions.

Game Introduction

About the Game

Pool Mania is a high-quality free online pool game that brings the classic 8-ball billiards experience directly to your browser. With an impressive 4.49/5 rating from players worldwide, this game delivers authentic pool gameplay with realistic physics and intuitive controls that make it accessible for both beginners and experienced players.

This HTML5-powered game requires no downloads or installations - simply open your browser and start playing immediately. Whether you're looking to practice your pool skills or enjoy a quick game during a break, Pool Mania provides an engaging billiards experience that captures the essence of real pool.

Core Features

Realistic Pool Physics

Experience authentic ball movement and collision mechanics that mirror real-world pool dynamics. The game's physics engine ensures that every shot feels natural and responsive, making your virtual pool experience as close to the real thing as possible.

Instant Play Technology

Built with modern HTML5 technology, Pool Mania loads quickly and runs smoothly across all devices. No waiting for downloads or dealing with complex installations - just click and play.

High Score Challenge

Compete for the highest scores and track your progress over time. The game features a scoring system that rewards precision, skill, and strategic play, encouraging you to improve with each game.

Cross-Platform Compatibility

Enjoy seamless gameplay whether you're on a desktop computer, laptop, tablet, or smartphone. The game automatically adapts to your screen size and input method for the best possible experience.

Gameplay

Classic 8-Ball Rules

Pool Mania follows traditional 8-ball pool rules, making it familiar to anyone who has played pool before. The objective is to pocket your designated group of balls (either solids or stripes) and then sink the 8-ball to win.

Strategic Gameplay

Every shot requires careful consideration of angle, power, and positioning. Plan your shots ahead to set up favorable positions for subsequent moves, just like in real pool.

Progressive Difficulty

As you improve your skills, the game becomes more challenging, keeping you engaged and motivated to master advanced techniques and strategies.

Operation Guide

Mouse Controls

  • Aim : Move your mouse to adjust the cue stick direction and line up your shot
  • Power Setup : Click and hold the left mouse button to prepare your shot
  • Shoot : Drag the mouse backwards to set shot power, then release to strike the cue ball
  • Fine Tuning : Use small mouse movements for precise aiming and gentle shots

Shooting Techniques

  • Soft Shots : Drag only slightly backwards for gentle taps and precise positioning
  • Power Shots : Pull the mouse further back for strong breaks and long-distance shots
  • Angle Shots : Use the visual cue line to plan bank shots and complex angles

Why Play This Game

Perfect for All Skill Levels

Whether you're new to pool or a seasoned player, Pool Mania offers an accessible entry point with room for skill development. The intuitive controls make it easy to start playing, while the realistic physics provide depth for advanced strategies.

No Cost, No Barriers

Enjoy premium pool gameplay completely free. No subscription fees, no in-app purchases, no hidden costs - just pure pool entertainment whenever you want it.

Convenient and Accessible

Play anywhere, anytime without the need for a physical pool table. Perfect for office breaks, travel entertainment, or whenever you want to practice your pool skills.

Brain Training Benefits

Pool games enhance spatial reasoning, strategic thinking, and hand-eye coordination. Regular play can improve your problem-solving skills and concentration abilities.

Social and Competitive

Challenge yourself to beat high scores and improve your personal best. Share your achievements with friends and family who also enjoy classic games.

Frequently Asked Questions (FAQ)