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
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)
Comments
Other issues: I got <1 FPS. This change gets me around 10:
--- lib/Zombies.py 2013-09-07 14:59:30.000000000 +0100
+++ lib/Zombies.py 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):
self.stopAction()
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...
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...
http://www.pygame.org/wiki/distributing
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 ;)
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 ;)
There's also a case-sensitivity issue: tries to load a ".Png" when the filename is in lower case, ".png"
Thanks for try to fix my bugs :)
f7f5 on 2013/09/10 20:24:
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 run_game.py
Traceback (most recent call last):
File "run_game.py", line 3, in lib.__main__.main()
File "/home/zzz/Jogos/pyweek/day 3/lib/__main__.py", line 17, in main
pygame.mixer.music.load(mainSong)
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