Welcome to Horse Racing, a simple Pygame-based game where you control a horse rider through a scrolling environment. In this game, you'll experience the thrill of horse racing as you navigate your way through the track.
In addition, this game serves as a tutorial for learning Pygame and game development principles. This tutorial is divided into 7 lessons:
- Lesson 1: Start Game Development with PyGame
- Lesson 2: Scroll the background
- Lesson 3: Add the Hero
- Lesson 4: Add Animations and Control
- Lesson 5: Add an Enemy
- Lesson 6: Implement Collision Detection
- Lesson 7: Display Text Components
- RIGHT Arrow Key: Increase speed and run faster.
- LEFT Arrow Key: Slow down the horse.
- UP Arrow Key: Jump to avoid coming foxes which slow you down.
- ESC Key: Quit the game.
- Python 3.12
- Pygame
- Clone this repository to your local machine and go to the project folder
- Install Python 3.12 if you haven't already.
- Create a Virtual Environment by running
python3 -m venv .venv
- Activate the Virtual Environment by running
source .venv/bin/activate
- Install Pygame by running
pip install pygame
. - Run the game by executing
python horse_racing_game.py
.
- The game is inspired by Horse Racing by -RemixKing-
- The classes Spritesheet and SpriteStripAnim were sourced from https://www.pygame.org/wiki/Spritesheet
- The horse rider image is from https://admurin.itch.io/pixel-character-horse-rider
- The background image is from https://ansimuz.itch.io/magic-cliffs-environment
- The testing images are found from https://lostgarden.com/2005/03/30/download-a-complete-set-of-sweet-8-bit-sinistar-clone-graphics/
- The background music is from https://ansimuz.itch.io/adventure-music-collection-pack-1
Enjoy the game! Feel free to share your feedback and suggestions.