Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dog-broad/raindropgameai
Catch falling raindrops đ§ī¸ in this arcade game đŽ. Play as Human đ¤ or AI đ¤
https://github.com/dog-broad/raindropgameai
ai arcade game gamedevelopment gaming pygame python
Last synced: 3 days ago
JSON representation
Catch falling raindrops đ§ī¸ in this arcade game đŽ. Play as Human đ¤ or AI đ¤
- Host: GitHub
- URL: https://github.com/dog-broad/raindropgameai
- Owner: dog-broad
- Created: 2024-07-12T04:20:38.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2024-07-13T08:05:43.000Z (7 months ago)
- Last Synced: 2024-12-01T23:27:33.014Z (2 months ago)
- Topics: ai, arcade, game, gamedevelopment, gaming, pygame, python
- Language: Python
- Homepage:
- Size: 170 KB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# đ§ī¸ Rain Bucket Game - Human vs. AI đĒŖ
Welcome to the Rain Bucket Game! This is an arcade-style game developed using Python's pygame library, now featuring both Human and AI modes. The objective remains the same: catch raindrops using a bucket and score points within a limited time.
## Features â¨
- Randomly generated raindrops fall from the top of the screen â
- **Human Control Mode**: Use arrow keys to move your bucket and catch raindrops đŽ
- **AI Control Mode**: Let the AI move the bucket using heuristic rules to catch raindrops automatically đ¤
- Separate scoring for Human and AI players, displayed during and after the game đ
- Adjustable game speed to control difficulty âŠ
- Game over condition after a specified duration âŗ
- Sound effects for catching raindrops and game over events đ## Requirements đ ī¸
- Python 3.x
- pygame library## Installation đĨ
1. Clone the repository:
```
git clone
```2. Install pygame:
```
pip install pygame
```## How to Play đšī¸
1. **Run the game** by executing `python rain_bucket_game.py`.
2. **Start the Game**:
- Click on **Start Game** on the main menu to begin.
3. **Select Control Mode**:
- **Human Control**: Use the left and right arrow keys to move the human bucket.
- **AI Control**: Watch as the AI automatically moves its bucket to catch raindrops based on heuristic rules.4. **Catch Raindrops**: Position your bucket(s) to catch falling raindrops. Each catch earns points for the respective player (Human or AI).
5. **Game Over**: The game ends after 30 seconds. You can return to the menu to play again.
---
### Changelog
#### Version 2.9 (Current Version)
- Users can now play against an AI
- Game Over screen now displays final score and game result#### Version 2.8
- Add sound effects for game events
- A water drop sound effect is played when a raindrop is caught by the bucket
- Game Over sound effect is played when the game ends#### Version 2.7
- The score is reset to 0 when the game ends to ensure a fresh start for the next game. (Bug fix for version 2.6)
#### Version 2.6
- Added bucket colors for human and AI control
- Refactored code to separate Human and AI control modes
- Improved user interface#### Version 2.5
- Update game duration to 30 seconds in game loop
#### Version 2.4
- Adjust bucket speed for smoother movement
#### Version 2.3
- The game can be now played with the human and AI control modes.
- Added game over screen with return to menu option.
- Improved look and feel of the start screen.#### Version 2.2
- Add control mode selection to start screen
- Refactor code to separate Human and AI control modes#### Version 2.1
- Enhanced AI control using heuristic rules:
- Distance Calculation: Calculates the distance between each raindrop and the bucket.
- Direction Prediction: Predicts the direction of each raindrop's movement (left or right).
- Optimal Bucket Movement: Moves the bucket towards the predicted landing position of the closest raindrop.#### Version 2
- Added AI control option for the bucket, automatically moving towards the closest raindrop.
- Improved Start Screen.
- Updated scoring system to reflect AI-controlled catches.#### Version 1
- Added game over condition after a specified duration (default 30 seconds).
- Enhanced user interface with a start screen featuring a clickable start button.
- Implemented scoring system where players accumulate points for catching raindrops with the bucket.#### Version 0.2
- Added player-controlled bucket to catch raindrops.
- Implemented collision detection between bucket and raindrops.
- Introduced adjustable game speed to control the falling rate of raindrops.
- Added game over condition after 60 seconds with final score display.#### Version 0.1
- Implemented basic game structure.
- Added functionality for raindrops to fall from the top of the screen.
- Implemented score tracking for each raindrop that falls off the screen.