10 Second Slaughter

by kjscott
Requires installation of Python 2.7 and Pygame 1.9

Use the Antichrist's shadow to kill the vile redshirt menace by manipulating your environment without killing yourself.

Press Z to toggle shadow mode
Press X to interact with objects
Press C to jump

Max score is approximately 120

Contact : @nerdofgamers - Graphics, @tccoxon & @db434 - Programming

Comments12

Plu26 Aug 2013, 19:25
Requires installation of Python 2.7 and Pygame 1.9
tombsar26 Aug 2013, 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
KJScottauthor26 Aug 2013, 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
tomc26 Aug 2013, 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.
tombsar27 Aug 2013, 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...
tombsar27 Aug 2013, 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
archaeometrician28 Aug 2013, 12:02
Is there a way for you to provide an executable ?
tomc
tomc28 Aug 2013, 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.
Arrow-x1 Sep 2013, 18:19
Good art bro I like this game
Jupiter_Hadley
Jupiter_Hadley2 Sep 2013, 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
MrBlade12 Sep 2013, 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!

Other games by @kjscott

Found a bug?
Tell us on Discord