5 Homebrew Python Games
2 September 2007
What is PyGame?
The Open Graphics Library (OpenGL) is used to make 2D and 3D graphics, it is the main competition to Microsoft's 'Direct' library. On top of this you can run the Simple DirectMedia Layer (SDL), this provides access to OpenGL and to the sound, keyboard, mouse and so on.
On top of this you can run Pygame, which is a library of Python modules that you can use to write graphical computer games in Python. This is where the fun begins. As well as providing the library, the Pygame website hosts games made by Pygame hobbyists, many of these games are made during one week game writing contents called 'Pyweek'.
I thought I would look at some of the games made with Pygame. No order or planning went into the selection of these, these are literally the first five games that I game across. As normal, click on the screenshots to enlarge.
PyTanks (unknown licence)
The first game, PyTanks by Joel Stenkvist, is a Scorched Earth-style artillery game (you younger people will know the game 'Worms' with its amusing sound effects). The idea is that you get all your friends around, take a tank each and blow each other up, all good clean fun!
- `.. image:: http://commandline.org.uk/images/posts/pygame/pygame-tank.png
-
alt: Tank game
`_
Endgame: Singularity (Open Source - GPL)
The next game was my favourite, `Endgame: Singularity`_ by 'Evil Mr Henry', is a strategy game where you play an Artificially intelligent program that is accidentally created on a University computer. You have to hide from the suspicious and hostile human race by obtaining as much computer power as possible, you can hack PCs or order custom clusters, build a race of robot helpers and even create server rooms in space. I do not want to give away much more as it spoils the fun.
`.. image:: http://commandline.org.uk/images/posts/pygame/pygame-endgame- singularity.png
alt: AI Game
`_
I really enjoyed playing the game through, but once you get the idea then the human race is not much trouble. What would really extend the game further would be a multiplayer mode, several AIs competing for resources and giving away the enemy AIs' positions to the humans would be really cool. I will certainly keep an eye on future development to see how he takes this game forward.
Galcon (Shareware i.e.Try before you buy)
Galcon by Phil Hassey is a nice little game where you have to send all your space ships between planets in order to control the galaxy.
- `.. image:: http://commandline.org.uk/images/posts/pygame/pygame-galcon.png
-
alt: Galcon screenshot
`_
Like many homebrew games, it is a bit too easy and simplistic once you have mastered the initial step, but otherwise it is fast moving, responds well and looks good.
GalaxyMage (Open Source - GPL)
Somewhat more ambitious is GalaxyMage. GalaxyMage is a turn based fantasy role playing game, that looks and feels like the tabletop war games that I played in my early teens, although the advantage of the computer game version is that it does not take half a day to lay out all the troops! If you have played these table top games then you will know the format already, each of your little men has a basic turn which consists of move then attack/spell.
`.. image:: http://commandline.org.uk/images/posts/pygame/pygame- galaxymage.png
alt: Fantasy Game
`_
GalaxyMage supports both single player and multi-player modes, and with a little bit more development could be a real goer, I can imagine a scene forming around it with different groups making different units, terrains and scenarios.
Colonel Wiljafjord and the Tarbukas Tyranny (Licence unknown)
The last game, Colonel Wiljafjord and the Tarbukas Tyranny, again by Phil Hassey, is a graphical adventure/puzzle game in the style of Day of the Tentacle or Monkey Island. It only seems to have one level at the moment (it was a PyWeek entry), but it is really nicely drawn and narrated. It shows what could be archived with PyGame in this genre.
`.. image:: http://commandline.org.uk/images/posts/pygame/pygame-colonel- wijafjord.png
alt: Puzzle Game
`_
`.. image:: http://commandline.org.uk/images/posts/pygame/pygame-colonel- wijafjord2.png
alt: Another shot of the Puzzle Game
`_
So they were the games that I played, if you try out any cool ones then let me know in the comments. Happy playing.




1 bug says...
Nice computer game. But I really can't figure how to not get exposed. Mind tipping me?
Posted at 1:08 p.m. on September 2, 2007
2 Joe Strout says...
Thanks for the review. But can you fix all those system errors and warnings interrupting all the posts? They make it a bit hard to read...
Posted at 1:32 p.m. on November 27, 2008