My game crashes without AVbin. What should I do?

Apparently, my game crashes if people don't have avbin installed because I have it trying to load mp3s. Any suggestions on the best way to deal with this?

(log in to comment)

Comments

for the pyweek compo you can put the first import into a try-except and in the except inform the user that it needs to install AVbin, with link :
http://code.google.com/p/avbin/
then terminate the game.
 
Thats a minimal, bug related change so it is fine to reupload.

Long term, your audio module keep flags about AVbin availability, and in each service in audio you check at the very beginning the flag, returning if no avail.
 
You can look an example of this in my entry, look at the audio.py in src. ( sadly, while this detail  works, the game is totally unfinished :(  )






i'm also having problems with avbin - i'm using Ubuntu Linux 9.04 - any instructions, or feedback from Linux users are very welcome!
in my game I just put this before I loaded all my mp3s/oggs (in a class that has a player):

        if pyglet.media.have_avbin:
            music = pyglet.resource.media( 'py_rasta_cave_loop.ogg' )
            self.player.queue( music )
well, i didn't have much problems with Pygame, but i never used Pyglet enough - maybe people with more experience could tell better - i'm very newbie on Pygame (i even don't know what classes are, for example...)
nitrofurano: Well, doing Pyweeks is a great opportunity to learn how to make better games. There's motivation, there's feedback, there's just the right amount of pressure and there are people to help with problems. :)

Regarding the issue of this thread, I see avbin as a requirement like any other. I think it's up to the user to install it, as long as they're informed about it.
Tee: i just say exactly the same! :)