Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 80 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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!