PyWeek Warmup - Helicopters


Well, I made a little pyweek warmup this morning, called "Helicopters". I'm having problems with the pyweek-upload.py script, so right now the game is hosted on my webpage. Download it here.

Enjoy the game, and please give me feedback!

(log in to comment)

Comments

Nice little game. I'm getting some static though. It seems to happen when several sounds are played at once. I'm using pygame 1.7.1release on Ubuntu 7.10.
Thanks! Hmm.. I'm not getting the static, but I'm running Windows XP. It might be because I'm using .ogg files for music and sounds... I know one game has done that before, but it was fixed. I'll look into it :)
I was able to fix it by making this change in main.py:
    pygame.mixer.pre_init(44100) # Added this line
    pygame.init()
Apparently my audio driver doesn't like 22050hz samples, but 44100hz is fine.
(Not sure what that'll do on windows, it may need to detect the OS and set it differently)
Oh, and the sound files being ogg seems to have no effect on the static. I first tried converting them all to WAV and modifying the code to load the WAVs instead, which made no difference.
@pymike: uploads to this site aren't allowed outside of the challenge itself unless you specifically ask me for permission.

Version 1.2 is released! Lots of updates, so check it out! :) Download here
@Popcorn:

Hmm... my speaker crackles when it's at 44100hz... weird problem :-/
Odd. I wonder if it's my OS or my sound card. I added this to the obvious place in main.py:
if sys.platform == "linux2":
  pygame.mixer.pre_init(44100)
which fixed it up nicely.
One thing I noticed about this version (don't recall if it happened in the old one) is that I several times saw explosions half way into the left side of the screen, as if a bomb had been dropped slightly out of frame. You may want to check that the bomb-dropping code doesn't drop bombs unless they're on the screen (preferably with a buffer zone, say 10 pixels from the edge)
Love your game!