A simple 2D game built with Pygame where the player controls a dinosaur that must jump and crouch to avoid obstacles. The game features scrolling ground, animated sprites, and increasing difficulty as the score goes up.
- Scrolling Ground: The ground continuously moves to simulate forward motion.
- Dino Control: Jump and crouch to avoid obstacles.
- Obstacles: Includes birds and trees that the dino must avoid.
- Scoring System: Points are awarded for surviving, and the game speed increases with the score.
- Sound Effects: Includes sounds for jumping, scoring, and game over.
-
Clone the repository:
git clone https://github.com/techiuv/dino-pyhon-game.git cd dino-python-game
-
Install Pygame:
Ensure you have Python installed. Then install Pygame using pip:
pip install pygame
-
Download Assets:
Make sure to add the following assets to the
assets
directory:ground.png
font.ttf
dino1.png
dino2.png
dino_crouch1.png
dino_crouch2.png
bird1.png
bird2.png
tree1.png
totree5.png
dead.mp3
jump.mp3
points.mp3
-
Run the Game:
Execute the game script using Python:
python main.py
- Spacebar: Jump
- Arrow Down: Crouch
- Restart: Spacebar when game over
Feel free to fork the repository and submit pull requests. If you find any issues or have suggestions for improvements, please open an issue on the GitHub repository.
- Pygame: For providing the framework to build the game.
- OpenGameArt.org: For some of the assets used in the game.