Creating a Game in Python Using PyGame – Introduction

Well as someone who programs a lot and likes using computers creating a viedo game is always something that I’ve wanted to do. In the past I spent a lot of time learning OpenGL and actually went quite far in the creation of a simple/not-so-simple game. The game was put on hold indefinitely once real life responsibilities started to encroach on my evenings. Since then I’ve longed to try again.

Every since I heard about PyGame from import this, I thought it looked promising. It’s cross platform, which is something that is very important to me as a developer, and it lets me stratch my Python skills which is the whole reason I have this website. Here is some of the about information from the PyGame website:

Pygame is a set of Python modules designed for writing games. It is written on top of the excellent SDL library. This allows you to create fully featured games and multimedia programs in the python language. Pygame is highly portable and runs on nearly every platform and operating system.

So I decided to test my skills and create a simple game using PyGame. My first instinct was to create a cool game, but I soom realized that creating cool game right away probably wasn’t going to be the easiest thing to do so I decided to try something really simple and went with the idea of a PacMan clone, which I decided to call PyMan.

Now I assume that there have been many PacMan clones written using PyGame, but I’m honestly not trying to copy them or steal their thunder, I’m simply trying to learn how PyGame works.

The first thing that you should do is visit the PyGame site and read some of their documentation and tutorials. So I’m going to assume that you have a limited understanding of what PyGame is and how to program in Python, not too much becuase I don’t, but still a little bit.

Since this project is probably going to be a bit more complicated I’m going to use Eclipse with the PyDev plugin. I’m also going to use the gimp for all of my graphics, since it’s the only graphics program that I know how to use, now I just need to figure out how to install it on OS X.

8 thoughts on “Creating a Game in Python Using PyGame – Introduction”

  1. I’m using Eclipse with PyDev/PyGame on my Mac OS X Leopard. Just started though. I’ve been hearing that the Eclipse platform is not so good though – too slow. The reason I chose Eclipse is because it also has Pluthon which is a plug-in for developing Python apps for the Nokia N810 Internet Tablet (which I intend to do). If it wasn’t for the N810 I would probably be using the Wing IDE from on my Mac.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>