Make a game with Pygame -- beginners tutorial -- Python
Find other posts in the same category: | | |

Short description (~1 to 3 sentences)

This is a 4 page tutorial on how to make a game with pygame. All the programming seems to be done with words (not drag and drop icons). This tutorial talks about classes and methods.

More details

The Game Plan

Before we jump into Python code, we need to develop the idea behind our game. Nothing complex is needed for our game, since its purpose is just to reinforce the basics of PyGame and demonstrate how to put them to use. With that said, let's move into the idea. The idea is to have the player at the bottom of the screen with the ability to move horizontally. Horizontal movement will be required to dodge incoming objects that will constantly be hurled at the player at fast speeds. Picture the player as a ship having to navigate at high speeds (which will be essentially an illusion, since the player will not be moving vertically; the incoming objects will) and dodge mines or enemy ships.

However, to give it an added degree of complexity and to make it more dynamic, levels will be stored as Python objects. Each level object will be responsible for loading the required images and laying them out in a layout list. The layout list will contain many more lists as elements that correspond to rows of objects. So, for example, picture a layout list as looking something like this:

[[0, 0, 0, 0],

[1, 0, 1, 0],

[1, 0, 1, 0],

[1, 0, 1, 0],

[0, 0, 0, 0]]

To read the full post, go here

Rating (1 to 100) 75 = very good; 50 = good; 1 = unknown

To see articles on the same topic, click the links below the name of the author at the top of this page.