pygame is
Simple DirectMedia Layer is
Site Swing
G Underground

G Underground - 0.1

Matthew Stevens (matts)



This game is a little buggy as it was written in less than 24 hours, feedback is appreciated and I may be shamed into fixing the issues.


Home Page:


click to view original size


G Underground - 0.1 - Jun 18, 2008 account Comments

If you wish to leave a comment with your account, please sign in first.

June 20, 2008 2:15pm - Matthew Stevens - nickname: (matts)
flummoxed: I created a png in the gimp. Then I used some python code to write out the string:

import zlib, base64
fp = open("Level1.png")
img_string = base64.b64encode(zlib.compress(

Then you can write img_string to a file, then use copy and paste to copy the content into image dictionary. I used vi and cat but it doesn't really matter.

This is the line where all the magic happens

surface = pygame.image.load(StringIO.StringIO(zlib.decompress(base64.b64decode(data[inaccessible_nodes_file]))),

This decompresses the string that is in the dictionary and puts it in a file like object, that the imageg.load function uses to load the image into a surface. I pass the file name in so that pygame knows what file type the compressed data is, and it can apply the appropriate loader.

The level graphics is just a black and white image of where the walls are.
June 18, 2008 4:36pm - Allan Lavell - nickname: (flummoxed)
How did you use the level graphics without actually having the graphics attached to your game? I noticed the data dictionary that seems to have graphics somehow... could explain exactly what it is you're doing?
June 18, 2008 9:15am - pymike - nickname: (pymike)
That one was pretty cool :) Only things I had problems with were

1. move too slow
2. when you run out of rockets you have to die to replenish them

Really nice job for 24h :)

our projects welcomes all python game, art, music, sound, video and multimedia projects. If they use pygame or not.
recent releases
Nov 17, 2015

Nov 12, 2015

Nov 11, 2015

Nov 8, 2015

Oct 16, 2015

Oct 9, 2015

Sep 11, 2015

Sep 6, 2015

Aug 26, 2015

Aug 25, 2015

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