Skip to content

Latest commit

 

History

History
19 lines (19 loc) · 1.44 KB

README.md

File metadata and controls

19 lines (19 loc) · 1.44 KB

About

This is my version of the Google Chrome Dinosaur Game. It was created in python with the pygame library.

About the Dinosaur Game

The Dinosaur Game is an infinite runner game, where the goal is to run for as long as possible. Obsticals, such as cacti and birds, appear as you run, and progressivly get faster. The player is able to duck and jump to avoid the obsticals.

My Version

All code is held in the DinosaurGame.py file. When the main() function is executed, all assets are loaded before the main game loop runs. During this time, the program checks if the data folder exists and if the score.txt file exists. If either do not exists, it will create the directory or file. The score.txt file is necessary to save the player's high score after the game is closed.

For each group of assets: Dinosaur, ground, obsticals, and clouds, there are functions to create, move, and delete them.

On startup, the very first game has a special animation in the beginning, to emulate what happens on the Google Chrome version

How to Play

To run the game, first run the DinosaurGame.py file. To start the game press the w or Up Arrow keys.

The controls are as follows:

  • w and Up Arrow: jump.
  • s and Down Arrow: duck.