L04_Play Game on Pycharm !¶
Download the Game Projects from Github¶
- Minesweeper uploaded by DionTsang
- T-Rex Runner by ahmed4end
-
Dinosaur-Game by baraltech, he also share a tutorial to make Dinosaur-Game step by step.
Open the Game with Pycharm¶
Click File - Open
Find the path to the file you just downloaded and copy it here
Configure Pycharm¶
- Select Your Local Python Interpreter. (not Virtual Environment)
-
2 ways to run your game project
-
Select the Current File and Click on Run button.
-
Or, Just move the mouse cursor to the code area of ββthe project, right-click, and select “Run
” to run the current code. -
Pip install packages
You will find that the Pygame module name is underlined with a red wavy line. This is because you need to install the pygame module to run this game. This is easy to fix:
Click Terminal button and type: pip install pygame
You can play it now !!! π€©ππ€π€¶
You can play it now !!! π€©ππ€π€¶
Hints¶
On windows, you can press windows + R to open Run command;
In MacOS, you go to the Terminal to open Run command
Type python
, you can check whether you’ve installed Python Interpreter:
Exit the Python shell by typing exit() or pressing Ctrl+Z (on Windows).
In the command line (outside the Python interpreter), run the following:
pip list
You can check all installed packages.
Dinosaur T-Rex Game Serial¶
Related Series:¶
Some inspiration on Dinosaurs¶
No PIL Package Resolved¶
pip install Pillow