/Dinosaur

A chrome dinosaur game written in Pygame

Primary LanguagePLSQLMIT LicenseMIT

Dinosaur

If you don't understand English, click here / Nếu bạn không hiểu tiếng Anh, bấm vào đây

A Chrome dinosaur game written entirely in Python.

dino

Platform: PC
Python version: >=3.7
Libraries:
    - read requirement.txt

Control

  • Space: Jump
  • Down arrow button: Duck
  • P: Pause

Jumping while pressing down arrow will make the dino fall faster

Build Instruction

ATTENTION: This instruction is designed specifically for Windows

Prerequisites:

  • Install the latest version of Python at python.org

To automatically build the game from source (easiest method), you can follow this instruction:

  • Download the content of this repository
  • Run compile.bat as Administrator to automatically package the game (package operations are listed in the file)
  • Once it's done, Dinosaur.exe will appear in the root of this directory. Run it.

(if you want to recompile the game, please remember to delete the old executable first)

To manually build the game, follow this instruction:

  • Download the content of this repository
  • Open the console and change the directory path to the path of this directory, run the following command: pip install -r requirement.txt
  • Continue and run this command: python -m PyInstaller --onefile -w -i="./assets/img/icon/dino.ico" entry.py
  • Delete ./build and ./entry.spec if not necessary
  • Move the executable from ./dist to the root of this repo
  • Run the executable

(Please note that the game will need some assets to function properly. You'll need the assets folder and config.json file to be in the same directory as the executable)

Contributing

If you notice any performance issues or bugs, you can open an issue in the Issues tab.

License

This project falls under the MIT License