El Paso Pygamers
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.
Since there are plenty of great free Python tutorials available, there is no need to create a new one here. Below is a list of them. Look them over and read whichever one you like.
Note that we use Python 3, so you should read a tutorial for Python 3 not Python 2. All of the above tutorials are for Python 3.
Please download pygamers.zip. This has the sample code that we will use. It has the following structure:
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.
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.