Skip to content

Latest commit

 

History

History
44 lines (31 loc) · 1.31 KB

File metadata and controls

44 lines (31 loc) · 1.31 KB

Chrome Dino Game in PyGame

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.

Installation

Set up environment

Install the latest version of python from here

Set up PyGame

pip install pygame

Run the Game

python dino_game.py

Game Controls

  • 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.

Concepts Covered in this Workshop

  1. Basic object rendering on screen
  2. Clock timing
  3. Basic PyGame events
  4. Rendering images
  5. Moving objects on the screen (Jump, Duck, Run)
  6. Taking user input from keyboard
  7. Playing background music
  8. Basic Animation of Bird and Dino Running
  9. Basic Collision detection
  10. 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!