Making a game in python

Hello, my name is Hugo van de Kuilen and this is part 1 of the “Making a Game in Python” series. This part is all about answering some questions you might have and the installation of all the necessary software to begin programming in Python. 

Table of Contents

F.A.Q

What is Python?

Python is an easy-to-learn programming language with infinite possibilities. Even NASA uses it! Python also has (At the moment of writing, now probably more!) 286.479 community-made packages all ready to use after entering a single command! Python is just amazing in almost every single way. Python also has multiple game-libraries, in this tutorial we are going to use Pygame.

NASA's GitHub repo

showing 58 results of programs written in python.

Why python and not something like C++ or C#?

This tutorial is focused towards beginners, thus, Python is a far better choice over other programming languages like C++ and C# since they are much harder and take much more time to learn than Python.

Installation

Python

Installing python is very straightforward: Just click here and press “Download Python (whatever current version)” at the time of writing, the latest version of python was 3.8.5 but that can be different for you depending on when you’re reading this. Open the app you just downloaded and follow the instructions, on Windows, you want to tick the “Add python to PATH” box in the beginning of the installer. And you’re done!

Modules

Making a game by ourselves would be unbelievably hard if it wasn’t for the thousands of community made modules/packages for python. In this tutorial we are going to use Pygame. Installing Pygame work differently on every platform. If you don’t know what OS you have:
 – Big Apple logo somewhere on your computer: macOS
 – Logo looking like a window in the bottom left: Windows
 – Anything else: Linux
Once you figured out what OS you have, follow the correct steps:

Windows

 – Press [Windows Key], type “cmd” and click “Run as Administrator”
 – Check if pip is installed by typing “pip help” in the big black box that just popped up
 – If it says “Command not recognized”, type this:

And hit enter, that will install pip for you. After it is done installing, Finally type:

And you’re done!

macOS & Linux

 – Open the app “Terminal”
 – Check if pip is installed by typing “pip help” in the big black box that just popped up
 – If it says “Command not recognized” or anything similar, type this:

And hit enter, that will install pip for you. After it is done installing, Finally type:

And you’re done!

Congratulations on reaching the end of part 1! I get it if this was a bit dull, next part we are actually going to be programming, so I promise that it will be much more fun! Click here to go to part 2: