Skip to content

Nishant2022/DinosaurGame

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Nishant's Version of the Google Dinosaur Game

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages