This is a fun experiment to learn PyGame by creating a simple game where a hero battles against monsters and collects coins.
-
Clone the repository:
git clone https://github.com/imigueldiaz/hero-monsters-pygame.git cd hero-monsters-pygame
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows use `venv\Scripts\activate`
-
Install the required dependencies:
pip install -r requirements.txt
-
Run the game:
python run_game.py
-
Controls:
- Left Arrow: Move hero left
- Right Arrow: Move hero right
- P: Pause/Unpause the game
- Space: Restart the game after game over
- Q or Escape: Quit the game
The game is over when the hero collides with a monster or the hero falls off the screen. The hero can collect coins to increase the score. The game has a simple pause menu that can be accessed by pressing the "P" key.
Lots of improvements can be made to the game, such as adding more levels, different types of monsters, power-ups, etc.
It's still a work in progress, and I'll continue to improve the game as I learn more about PyGame.
This project is only a fun experiment to learn PyGame. Feel free to explore, modify, and enhance the game as you like!
This project is licensed under the MIT License.