From 9ea9bbdf3c4c9096934638ae41615ef23520f85c Mon Sep 17 00:00:00 2001 From: mashalumairniazi Date: Sun, 28 Jul 2024 20:06:03 +0500 Subject: [PATCH] Update README.md --- README.md | 81 ++++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 80 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index b1d7ec2..35eb69a 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,81 @@ # PygameForBeginners -A simple 2D python game designed to teach you the pygame module. + +## Introduction + +**PygameForBeginners** is a simple 2D Python game designed to teach you the basics of the Pygame module. This project demonstrates fundamental concepts in game development such as handling user input, updating game state, and rendering graphics. + +## Game Description + +This game is a two-player spaceship battle. Each player controls a spaceship and tries to shoot the opponent while avoiding being hit. The first player to deplete the opponent's health wins the game. + +## Features + +- Two-player gameplay +- Spaceship movement and shooting mechanics +- Health tracking and winner announcement +- Simple and intuitive user interface + +## Requirements + +- Python 3.x +- Pygame + +## Installation + +1. Clone the repository: + ```bash + git clone https://github.com/your-username/PygameForBeginners.git + +2. Navigate to the project directory: + ```bash + cd PygameForBeginners + +3. Install the required dependencies: + ```bash + pip install -r requirements.txt + +## How to play + +1. Run the game: + ```bash + python main.py + +## Controls + +- **Player 1 (Yellow Spaceship)**: + - Move Left: `A` + - Move Right: `D` + - Move Up: `W` + - Move Down: `S` + - Shoot: `Left Ctrl` +- **Player 2 (Red Spaceship)**: + - Move Left: `Left Arrow` + - Move Right: `Right Arrow` + - Move Up: `Up Arrow` + - Move Down: `Down Arrow` + - Shoot: `Right Ctrl` + +## The objective + +The objective is to hit the opponent's spaceship until their health is depleted. The game announces the winner once one player's health reaches zero. + +## Assets + +The game includes the following assets: +- Spaceship images (`spaceship_yellow.png`, `spaceship_red.png`) +- Background image (`space.png`) + +These assets are located in the `Assets` folder. + +## Contact + +For any questions or feedback, please open an issue in the repository. + +## Contributing + +Contributions are welcome! Please fork the repository and submit a pull request for any enhancements or bug fixes. + +--- + +Enjoy the game and happy learning with Pygame! +