A modern, interactive pool game built with vanilla JavaScript and HTML5 Canvas. Features realistic physics, AI opponent, and intuitive controls.
(You may want to add a screenshot of your game)
- ๐ฑ Realistic pool physics and ball collisions
- ๐ฏ Intuitive aiming system with trajectory prediction
- ๐ค AI opponent with strategic shot planning
- ๐ฎ Power control system with visual feedback
- ๐ Immersive sound effects
- ๐ป Pure JavaScript implementation - no external dependencies
- Mouse Movement: Aim the cue
- Left Click (Hold): Charge shot power
- Left Click (Release): Take shot
- Space Bar: Hold to set power manually
- Arrow Up: Increase shot power
- Arrow Down: Decrease shot power
- R Key: Show robot's predicted shot
- Tab: Focus game canvas for keyboard controls
- A modern web browser with HTML5 Canvas support
- Local web server (recommended for sound effects)
- Clone the repository or download the files
- If using Visual Studio Code, install the "Live Server" extension
- Right-click
index.htmland select "Open with Live Server"
Alternatively, you can use any local web server:
# Using Python 3
python -m http.server
# Using Node.js
npx http-serverPool/
โโโ index.html # Main game HTML
โโโ game.js # Game logic and physics
โโโ styles.css # Game styling
โโโ sounds/ # Sound effects
โโโ ballscollide.wav
โโโ hole.wav
โโโ side.wav
โโโ strike.wav
- Elastic collision detection and response
- Velocity-based movement system
- Friction simulation
- Wall and pocket collision detection
Tested and working in:
- Firefox (Recommended)
- Chrome
- Edge
- Safari
Feel free to open issues or submit pull requests for:
- Bug fixes
- New features
- Performance improvements
- Documentation updates
This project is open source and available under the MIT License.
- Sound effects sourced from various free sound libraries
- Physics calculations based on standard pool/billiards mechanics
- Inspired by classic pool games and modern web technologies