Pygame: How To’s?

This tutorial is the fifth tutorial in a serie of five Pygame tutorials:

Now that you have completed your first game you may want to customise it further of or add extra functionalities. The following How-To’s tutorials may become quiet useful.

Also remember that a Pygame game will be based around the main program loop. Make sure you fully understand the structure of your main.py file:

pygame-main-program-loop-flowchart

How to Add a Background Picture to the game
How to use the transparentcy of a PNG file
How to display text on the screen
How to flip your sprite
How to find out if a key is pressed
How to create a popup input box
How to drag a sprite on the screen using the mouse
How to check the color of a pixel at a given position
How to pause the game when the player presses a key (e.g. space bar)
Share Button
Posted in Computer Science, Python - Intermediate, Python Challenges Tagged with:

Our Latest Book