pygame is
Python
Simple DirectMedia Layer
 
 
pygame.org is
Site Swing
Wiki

El Paso Pygamers

      
Search:  
 
 
sections
Download
Tutorials
Samples
Programming
Getting Help

El Paso Pygamers is for anyone in the El Paso area who wants to program video games. We will use the Python programming langauge with Pygame. (See Why Pygame.) These are serious programming tools that will let you build real games from scratch.

Download

For Microsoft Windows, please download and install Python 3.1.4 and Pygame 1.9.1. There is no Pygame for Python 3 on the Mac, so we won't support the Mac until there is. And if you use Unix, I assume you can figure it all out for yourself.

Tutorials

Samples

Please download pygamers.zip. This has the sample code that we will use. It has the following structure:

  • basics - This folder contains basic python programs to introduce you to what python can do.
  • draw - This folder contains a number of python programs that draw things.
    • drawing.py - This module makes drawing easier. The other programs in this folder use this module.
    • drawing.html - This contains pydoc generated documentation of the drawing module.
  • game - This folder contains a few simple games.
    • gaming.py - This module is a very simple framework for Pygame that makes games a little easier to write.
    • gaming.html - This contains pydoc generated documentation of the gaming module.

Start with the basics folder. With the help of the tutorials, you should be able to understand what each file in this folder does. Look at the python files and run them and make sure that you understand the output. Feel free to edit these files. Playing with programs is what programming is all about. One of the files is a guess-the-number game. Copy it to another python file and try to change it to limit the number of guesses.

Next look at the programs in the draw folder. To understand these programs, you should look at the documentation in drawing.html. These programs draw a few different things including some national flags. Try to write programs to draw other shapes, maybe other flags. When you have mastered this, then look at drawing.py together with the Pygame documentation and make sure you understand how it works.

Now you are ready for the game folder. The games here use the gaming module, so look at gaming.html and gaming.py to understand how this module works. Then look through the games. When you understand the games in this module, you can try to write your own games.

Note that both the drawing module and the gaming module let you press the escape key to interrupt the program. Then you can use the python command line to inspect variables or do whatever you want. You can do run() from the command line to continue your program.

Programming

You become a programmer by playing with code (programs). If you aren't sure how something works, just play with it and try things until you understand it. You can edit any files in the samples. After all, you can always download the samples again and start over.

Most tutorials will suggest that you program using IDLE. This is a tool that helps you write and run python programs.

Another option for running programs is to set the PYTHONINSPECT environment variable. This will run the python command line after your program is done. You can edit your python programs with your favorite text editor and then run the programs directly.

Getting Help

We have an El Paso Pygamers forum where you can post questions. There is also general Pygame Help (irc, lists).

We have weekly classes at St. Nicholas Church on Thursdays from 1pm to 3pm in the building behind the church. Please bring your laptop.

spotlight

 
our projects
pygame.org welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
 
recent releases
Aug 19, 2014

Aug 18, 2014

Aug 2, 2014


Jul 28, 2014

Jul 22, 2014

Jul 21, 2014

Jul 20, 2014

Jul 19, 2014

Jul 15, 2014

Jul 9, 2014

Jun 27, 2014

... more!
 
for pygame related questions, comments, and suggestions, please see help (lists, irc)