Welcome to the 8-Ball Pool Game! This is a Python-based simulation of the classic 8-ball pool game, complete with realistic physics, smooth gameplay, and an attractive user interface. Whether you're a seasoned player or just looking for some fun, this game provides an engaging experience.
- Realistic Physics: The game implements realistic ball collisions and movements to simulate the experience of playing on a real pool table.
- Textured Table and Balls: The game features a visually appealing pool table and ball textures, enhancing the game's overall aesthetics.
- Smooth Gameplay: Responsive controls and intuitive gameplay mechanics.
- Player Indication: The game clearly indicates whose turn it is and displays the type of balls (solid or stripes) assigned to each player.
- Foul Detection: The game detects and displays fouls according to standard 8-ball pool rules.
To run this game locally, follow these steps:
-
Clone the Repository:
git clone https://github.com/hbarquanta/8-Ball-Pool-Game.git
-
Navigate to the Project Directory:
cd 8-Ball-Pool-Game
-
Install the Dependencies:
- Make sure you have Python installed.
- Install required libraries using pip:
pip install pygame numpy
-
Run the Game:
python main.py
- Objective: The goal is to pocket all of your assigned balls (solids or stripes) and then legally pocket the 8-ball.
- Controls:
- Use your mouse to aim the cue.
- Adjust the power of your shot using the power slider.
- Click "Shoot" to take your shot.
- Player 1 always starts.
- Players must first pocket all of their assigned balls (solids or stripes) before attempting to pocket the 8-ball.
- Turn Switching:
- A player continues to play as long as they legally pocket one of their assigned balls.
- If a player fails to pocket a ball or commits a foul, their turn ends.
- Fouls:
- Pocketing the cue ball.
- Pocketing an opponent's ball.
- Failing to hit any balls with the cue ball.
- The game ends when the 8-ball is legally pocketed by the player who has pocketed all their assigned balls.
This project is licensed under the MIT License - see the LICENSE file for details.
Contributions are welcome! Please fork this repository, create a new branch, and submit a pull request. Please ensure your code follows the project's coding standards.