To test the pygame functions, open your text editor, create a file called
sample.py, and save this file in your work folder. Once you have created this file, you are ready to start learning pygame. To use pygame, we will import the pygame module in the first line of our
Next, we need to take a look at the methods that we need in order to start our instance of pygame. To start pygame, we need to initialize an instance of all the pygame modules. We do this by calling the
A pygame game loop is the same as the game loops that we used in previous projects. In this chapter, it will be a
while loop that uses
while True in order to indicate that the game loop should repeat ...