plu 2013-08-26 19:25
Requires installation of Python 2.7 and Pygame 1.9
Foon → Ludum Dare Explorer → LD27 → 10 Second Slaughter
By kjscott
| Category | Rank | Score | Count | |
|---|---|---|---|---|
| Coolness | 1970 |
Requires installation of Python 2.7 and Pygame 1.9
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?
@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.
@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.
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...
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.
Is there a way for you to provide an executable ?
@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.
swell pixels!
Good art bro I like this game
"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
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!