{"id":22147844,"url":"https://github.com/dog-broad/raindropgameai","last_synced_at":"2025-03-24T12:41:10.794Z","repository":{"id":248063866,"uuid":"827637219","full_name":"dog-broad/RainDropGameAI","owner":"dog-broad","description":"Catch falling raindrops 🌧️ in this arcade game 🎮. Play as Human 👤 or AI 🤖","archived":false,"fork":false,"pushed_at":"2024-07-13T08:05:43.000Z","size":174,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T17:44:41.897Z","etag":null,"topics":["ai","arcade","game","gamedevelopment","gaming","pygame","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dog-broad.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-12T04:20:38.000Z","updated_at":"2024-10-22T16:45:47.000Z","dependencies_parsed_at":"2024-12-01T23:35:36.813Z","dependency_job_id":null,"html_url":"https://github.com/dog-broad/RainDropGameAI","commit_stats":null,"previous_names":["dog-broad/raindropgameai"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dog-broad%2FRainDropGameAI","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dog-broad%2FRainDropGameAI/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dog-broad%2FRainDropGameAI/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dog-broad%2FRainDropGameAI/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dog-broad","download_url":"https://codeload.github.com/dog-broad/RainDropGameAI/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245273507,"owners_count":20588595,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","arcade","game","gamedevelopment","gaming","pygame","python"],"created_at":"2024-12-01T23:24:44.379Z","updated_at":"2025-03-24T12:41:10.774Z","avatar_url":"https://github.com/dog-broad.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌧️ Rain Bucket Game - Human vs. AI 🪣\n\nWelcome 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.\n\n## Features ✨\n\n- Randomly generated raindrops fall from the top of the screen ☔\n- **Human Control Mode**: Use arrow keys to move your bucket and catch raindrops 🎮\n- **AI Control Mode**: Let the AI move the bucket using heuristic rules to catch raindrops automatically 🤖\n- Separate scoring for Human and AI players, displayed during and after the game 🌟\n- Adjustable game speed to control difficulty ⏩\n- Game over condition after a specified duration ⏳\n- Sound effects for catching raindrops and game over events 🔊\n\n## Requirements 🛠️\n\n- Python 3.x\n- pygame library\n\n## Installation 📥\n\n1. Clone the repository:\n   \n   ```\n   git clone \u003crepository-url\u003e\n   ```\n\n2. Install pygame:\n   \n   ```\n   pip install pygame\n   ```\n\n## How to Play 🕹️\n\n1. **Run the game** by executing `python rain_bucket_game.py`.\n   \n2. **Start the Game**:\n   - Click on **Start Game** on the main menu to begin.\n   \n3. **Select Control Mode**:\n   - **Human Control**: Use the left and right arrow keys to move the human bucket.\n   - **AI Control**: Watch as the AI automatically moves its bucket to catch raindrops based on heuristic rules.\n\n4. **Catch Raindrops**: Position your bucket(s) to catch falling raindrops. Each catch earns points for the respective player (Human or AI).\n\n5. **Game Over**: The game ends after 30 seconds. You can return to the menu to play again.\n\n---\n\n### Changelog\n\n#### Version 2.9 (Current Version)\n\n- Users can now play against an AI\n- Game Over screen now displays final score and game result\n\n#### Version 2.8 \n\n- Add sound effects for game events\n  - A water drop sound effect is played when a raindrop is caught by the bucket\n  - Game Over sound effect is played when the game ends\n\n#### Version 2.7\n\n- 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)\n\n#### Version 2.6\n\n- Added bucket colors for human and AI control\n- Refactored code to separate Human and AI control modes\n- Improved user interface\n\n#### Version 2.5\n\n- Update game duration to 30 seconds in game loop\n\n#### Version 2.4\n\n- Adjust bucket speed for smoother movement\n\n#### Version 2.3 \n\n- The game can be now played with the human and AI control modes.\n- Added game over screen with return to menu option.\n- Improved look and feel of the start screen.\n\n#### Version 2.2 \n\n- Add control mode selection to start screen\n- Refactor code to separate Human and AI control modes\n\n#### Version 2.1\n\n- Enhanced AI control using heuristic rules:\n  - Distance Calculation: Calculates the distance between each raindrop and the bucket.\n  - Direction Prediction: Predicts the direction of each raindrop's movement (left or right).\n  - Optimal Bucket Movement: Moves the bucket towards the predicted landing position of the closest raindrop.\n\n#### Version 2\n\n- Added AI control option for the bucket, automatically moving towards the closest raindrop.\n- Improved Start Screen.\n- Updated scoring system to reflect AI-controlled catches.\n\n#### Version 1\n\n- Added game over condition after a specified duration (default 30 seconds).\n- Enhanced user interface with a start screen featuring a clickable start button.\n- Implemented scoring system where players accumulate points for catching raindrops with the bucket.\n\n#### Version 0.2\n\n- Added player-controlled bucket to catch raindrops.\n- Implemented collision detection between bucket and raindrops.\n- Introduced adjustable game speed to control the falling rate of raindrops.\n- Added game over condition after 60 seconds with final score display.\n\n#### Version 0.1\n\n- Implemented basic game structure.\n- Added functionality for raindrops to fall from the top of the screen.\n- Implemented score tracking for each raindrop that falls off the screen.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdog-broad%2Fraindropgameai","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdog-broad%2Fraindropgameai","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdog-broad%2Fraindropgameai/lists"}