FoonLudum Dare ExplorerLD27 → 10 Second Slaughter

10 Second Slaughter

By kjscott

View on Wayback Machine

CategoryRankScoreCount
Coolness1970

Comments

plu 2013-08-26 19:25

Requires installation of Python 2.7 and Pygame 1.9

tombsar 2013-08-26 19:40

For some reason Python was unable to load and play the mp3 files on my computer. I removed the appropriate lines from src/sound.py as a quick-fix solution, but that means playing without music. Any suggestions?

kjscott 2013-08-26 19:53

@tombsar, I don't know what the issue is. I worked on the graphics for the game hopefully one of the programmers will get back in touch and let you know how to resolve the issue. By any chance could you post the appropriate lines you need to remove incase anyone else has the same issue.

tomc 2013-08-26 20:01

@tombsar: I'm one of the coders. Thanks for letting us know. Which operating system are you using? Is anything printed to the console / terminal?

If you're on linux, do you have (libmp3)lame installed? This library is required to playback MP3s.

tombsar 2013-08-27 19:04

Hey guys, thanks for getting back to me. I have both 'lame' and 'lame-libs' installed on Fedora 18, and can play mp3 files in my browser and media players.

The error printed is:

Traceback (most recent call last):
File "src/main.py", line 62, in <module>
main()
File "src/main.py", line 40, in main
game.event(ev)
File "/home/arthur/Downloads/LD27_Entries/10SecondSlaughter/src/gamestates.py", line 296, in event
self._state.event(ev)
File "/home/arthur/Downloads/LD27_Entries/10SecondSlaughter/src/gamestates.py", line 54, in event
self.game.set_state(PlayState(self.game))
File "/home/arthur/Downloads/LD27_Entries/10SecondSlaughter/src/gamestates.py", line 174, in set_state
self._state.leave()
File "/home/arthur/Downloads/LD27_Entries/10SecondSlaughter/src/gamestates.py", line 49, in leave
sound.play_main_music()
File "/home/arthur/Downloads/LD27_Entries/10SecondSlaughter/src/sound.py", line 20, in play_main_music
mixer.music.load(os.path.join('assets','music.mp3'))
pygame.error: Unrecognized music format

To fix it, I applied the following patch to src/sound.py:

def play_main_music():
+ print "Music disabled"
- mixer.music.load(os.path.join('assets','music.mp3'))
- mixer.music.play()

...

def play_gameover_music():
+ print "Music disabled"
- mixer.music.load(os.path.join('assets','gameover.mp3'))
- mixer.music.play()

I am probably using an old version of pygame-music, or am missing a python-lame extension or something...

tombsar 2013-08-27 19:10

Sorry for the double post, but I wanted to save you having to ask about versions.

I am running Python 2.7.3 with Pygame 1.9.1 (at least that is what Fedora claims it is). Also, lame is version 3.99.5.

archaeometrician 2013-08-28 12:02

Is there a way for you to provide an executable ?

tomc 2013-08-28 14:05

@tombsar: I've just uploaded a version that fixes this crash (falls back to some OGG files if the MP3 playback fails). I hope that works for you.

paperblurt 2013-08-30 17:41

swell pixels!

arrow-x 2013-09-01 18:19

Good art bro I like this game

jupiter_hadley 2013-09-02 23:47

"Requires installation of Python 2.7 and Pygame 1.9" Wish I didnt have to install random things to play the game. Due to that, I am unable to include it in my LD27 compilation video. Sorry

mrblade 2013-09-12 20:17

Won't start, sorry. Running the .bat gives some file not found error, running main.py creates a pygame window and then closes right away. Let me know if you find a fix!