Game Development Community

MP3 support for Game Builder

by Arden · in Torque Game Builder · 05/08/2006 (8:19 am) · 7 replies

Hello again!

I was browsing through the forums to find out how does one go about playing Mp3's in a game programmed with GB instead of wavs. I am planning to make extensive use of audio, so being able to have the best compression possible is of the essence. I am not stuck on Mp3's however, and if there's another specific format recommended I am avid to find out what it is. So far, I have found some info on Bass, but no posts confirming if it is a viable option in GB.

Thanks for any info!

#1
05/08/2006 (8:27 am)
Use OGG rather than MP3. That way you do not have to pay licensing fees. Plus, OGG works out of the box.
#2
05/08/2006 (8:29 am)
I assume there's support in there for .ogg. I can't say for sure because I haven't had the chance yet to really dive into TGB, but I would assume that since it's there in TGE it would be in TGB as well.
#3
05/08/2006 (9:46 am)
Yeah .ogg works right out of the box. A quick way to see for yourself is to drop an ogg file into the folder of one of the demo games. Then just replace the line in the script (audioDatablocks.cs) that loads the background music with the path to your .ogg file.

example:
I did this in the fish demo game:
dropped a file called bgm.ogg into the sounds directory and

just change the line

filename = "~/client/sounds/oceanwhales.wav";

to:

filename = "~/client/sounds/bgm.ogg";


You can get info about Ogg Vorbis and sample .ogg files at the Vorbis home page:
www.vorbis.com/
#4
05/08/2006 (11:33 am)
Don't forget audacity is a great free sound editor/convertor and happily deals with generating ogg files.
#5
05/08/2006 (12:13 pm)
Wow! Awesome guys. I am amazed at the amount of feedback in this forum. It makes it almost too easy :)

Thanks again for your time, I'll try it out as soon as I fire up the editor tonight :)
#6
05/08/2006 (3:01 pm)
Can anyone tell me what other audio formats work with TGE. I'm thinking of buying it, but there's no mention of what audio formats are supported on the product features page. I realize I can drop in another audio engine like FMOD or BASS, but I don't want to mess with the engine, so I want to know what is supported "out of the box". It looks like WAV and OGG are supported. What about MIDI or Tracker files like XM, IT, S3M, or MOD?
#7
05/08/2006 (3:19 pm)
Wav and OGG are supported, Greg.