Final of the pyweek

This was my first PyWeek, and I'm very proud of myself.
and made my game in just four days. the first 3 days I did not know what to do, and I started three different games. But eventually the light came to me and made the game give you today

sorry for any spelling error the English is not my native language and I don't know very well some expressions

(log in to comment)


Unfortunately Fedora 16 ships with a version of SDL mixer that does not support mp3.

So when I try to run the game I get an error:
$ python
Traceback (most recent call last):
File "", line 3, in lib.__main__.main()
File "/home/zzz/Jogos/pyweek/day 3/lib/", line 17, in main
pygame.error: Module format not recognized

It's the same error I get when trying to play your mp3 with SDL's playmus:

$ playmus DST-RailJet.mp3
Opened audio at 22050 Hz 16 bit stereo (LE), 4096 bytes audio buffer
Couldn't load DST-RailJet.mp3: Module format not recognized
f7f5: You can just delete that line and play without music. I've actually converted the song to OGG and play that.

Other issues: I got <1 FPS. This change gets me around 10:

--- lib/    2013-09-07 14:59:30.000000000 +0100
+++ lib/    2013-09-12 16:20:41.000000000 +0100
@@ -64,11 +64,7 @@
         self.uping    = False
     def hasWallCollition(self, walls, playerRect):
-        for wall in walls:
-            if playerRect.colliderect(wall):
-                return True
-        return False
+        return playerRect.collidelist(walls) != -1
     def update(self, screen, walls, playerRect):

I'm sure there is much more that can be done to improve performance, but this makes it playable.

If the map has many diagonals in it, this is due to a dependence on the decoding of DOS newlines. One solution is to change the newlines in data/levels.txt, another is to fix Map.loadMap().

After all this, the player character is still invisible for me. Not sure what's up with that, but I think I've got all the enjoyment out of this game that I'm going to get :).

It's a fine first entry though! Getting good cross-platform compatibility is always a struggle...
You're right, cross-compatibility can be difficult at first. I've found this very useful:

Besides a couple of mp3 files (that is not a big deal, just annoying), I haven't found any big portability issues so far. May be is because I've played some a few games ;)
I converted to ogg but I'm facing the asme problems as cyhawk.

There's also a case-sensitivity issue: tries to load a ".Png" when the filename is in lower case, ".png"
Here's how I got it running on Unix:
Sorry about cross-compatibility bugs, i just had the enough time to end the game, i have many bugs in my game but i very proud of myself to my first entry could do a playable game.

Thanks for try to fix my bugs :)