{"id":22680164,"url":"https://github.com/coderooz/simple_pygame_game","last_synced_at":"2025-07-13T21:08:39.352Z","repository":{"id":247901327,"uuid":"827178025","full_name":"coderooz/simple_pygame_game","owner":"coderooz","description":"This is a simple game built with Python and Pygame. Control a red block using the arrow keys to avoid falling white blocks. Earn points for every white block that passes without collision. Features include a score system, game over screen, and replay functionality. Perfect for learning basic game development with Pygame.","archived":false,"fork":false,"pushed_at":"2024-07-19T16:01:01.000Z","size":52,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T13:51:44.238Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/coderooz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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-11T06:43:48.000Z","updated_at":"2024-07-19T16:01:04.000Z","dependencies_parsed_at":"2024-07-11T08:07:30.158Z","dependency_job_id":"5b95612f-266a-4fd2-a1fb-33af14fd06be","html_url":"https://github.com/coderooz/simple_pygame_game","commit_stats":null,"previous_names":["coderooz/simple_pygame_game"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/coderooz/simple_pygame_game","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fsimple_pygame_game","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fsimple_pygame_game/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fsimple_pygame_game/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fsimple_pygame_game/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/coderooz","download_url":"https://codeload.github.com/coderooz/simple_pygame_game/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/coderooz%2Fsimple_pygame_game/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265205775,"owners_count":23727511,"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":[],"created_at":"2024-12-09T19:12:35.573Z","updated_at":"2025-07-13T21:08:39.312Z","avatar_url":"https://github.com/coderooz.png","language":"Python","readme":"\n## Simple Pygame Project\n\nThis is a simple game developed using Python and Pygame. In this game, the player controls a red block that can move left and right to avoid collision with the falling white blocks. The game continues until the player collides with a white block, at which point the game ends and the player can choose to replay. The player earns points for every white block that passes without colliding.\n\n![Game Image](img/game_start.png)\n\n### Features\n- **Player Movement**: Use the left and right arrow keys to move the red block.\n- **Enemies**: White blocks fall from the top of the screen at a constant speed.\n- **Score System**: Earn points for every enemy that moves past the player without collision.\n- **Game Over Screen**: Displays \"Game Over\" and shows a replay button to restart the game.\n- **Replay Functionality**: Allows the player to start a new game without restarting the program.\n\n### How to Run\n1. Ensure you have Python and Pygame installed. You can install Pygame using the following command:\n   ```sh\n   pip install pygame\n   ```\n2. Clone the repository:\n   ```sh\n   git clone https://github.com/coderooz/simple_pygame_game.git\n   ```\n3. Navigate to the project directory:\n   ```sh\n   cd simple-pygame-game\n   ```\n4. Run the game:\n   ```sh\n   python main.py\n   ```\n\n### File Structure\n```\nsimple_pygame_game/\n├── main.py\n├── game.py\n└── settings.py\n```\n\n\n### Explanation\n\n1. **settings.py**: Contains all the configuration settings for easy adjustments.\n2. **game.py**: \n   - `Player` and `Enemy` classes encapsulate the behavior and properties of the game objects.\n   - `Game` class manages the game loop, event handling, updates, and drawing.\n3. **main.py**: Starts the game by creating an instance of `Game` and calling its `run` method.\n\n### Running the Game\n\nTo run the game, execute the `main.py` file:\n\n```sh\npython main.py\n```\n\n- **main.py**: The entry point of the game. Initializes and starts the game.\n- **game.py**: Contains the main game logic, including the game loop, player and enemy classes, and collision detection.\n- **settings.py**: Configuration file for game settings like screen dimensions, colors, and speeds.\n\n### Some Images:\n\n![Game Image](img/game_start.png)\n![Game Play 1 Image](img/game_play.png)\n![Game Play 2 Image](img/game_play2.png)\n![Game Play 3 Image](img/game_play3.png)\n![End Game Image](img/end_game.png)\n\n### Future Improvements\n- Add multiple enemies.\n- Increase the difficulty over time by increasing enemy speed.\n- Add sound effects and background music.\n- Implement a high score system.\n\n### Contributing\nFeel free to fork this repository and contribute by submitting a pull request. For major changes, please open an issue first to discuss what you would like to change.\n\n### License\nThis project is licensed under the MIT License. See the `LICENSE` file for more details.\n\n---\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderooz%2Fsimple_pygame_game","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcoderooz%2Fsimple_pygame_game","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcoderooz%2Fsimple_pygame_game/lists"}