In this workshop, we will cover some basics of PyGame and build a simple Dino Game! The game is inspired by the Google Chrome Dino Game, which appears when you are offline. The objective of the game is to control a dinosaur and avoid obstacles (cacti) while collecting points. The game features basic animations, collision detection, and a scoring system.
Install the latest version of python
from here
pip install pygame
python dino_game.py
- Press the spacebar to make the dinosaur jump.
- Press the down arrow to make the dinosaur duck. The game will be progressively difficult as the speed of the dino increases over time.
- Basic object rendering on screen
- Clock timing
- Basic PyGame events
- Rendering images
- Moving objects on the screen (Jump, Duck, Run)
- Taking user input from keyboard
- Playing background music
- Basic Animation of Bird and Dino Running
- Basic Collision detection
- Basic Scoreboard
We will learn all these by developing a game from scratch. So keep your Computer and coffee mug ready if you want to follow along!