Want a Free Copy of Best of Game Programming Gems?
Back in 2002 I wrote a chapter for Game Programming Gems 3 about using Ogg Vorbis for sound in games. Unknown to many gamers, Ogg Vorbis has gotten a lot of adoption in mainstream game titles. Epic has long used Vorbis and Speex in their Unreal Engine, for example, and the list of other publishers is quite long and even includes Microsoft. Apparently the chapter I wrote has helped a few developers learn the ropes, and the publisher has decided to include it in the recently released Best of Game Programming Gems. Keep reading to find out how you might score a free copy of the book.
What is this Ogg Vorbis thing?
For those who may not be familiar, Ogg Vorbis is an openly specified, patent free audio codec that has superior quality to the MP3 format. The Ogg Vorbis reference implementations are open source software and of very high quality.
Ogg Vorbis was created because the patents on the MP3 technology prevent a whole range of businesses and software developers from using it, stifling innovation in the audio space. Much has been written about this before.
Why Ogg Vorbis for games?
There are a several technical reasons that Ogg Vorbis makes a good choice for games without even getting into the patent licensing issue.
- Vorbis has sample accurate seeking and playback. In MP3 the best you can do is get to the closest frame to the sample and start playback from there. This problem even persists into MPEG-4 audio and is the reason that Apple and others have had to build in hacks to get gapless playback. For sound effects, this is a major problem, and Vorbis solves it easily.
- Vorbis encoded files are smaller and higher quality. Because the Vorbis codec is so much better than MP3, it is possible to achieve much smaller file sizes for the same quality as MP3, much higher quality for the same file size, or even a little better quality and a little better filesize.
- Ogg is easily extensible to carry other formats. It has been used for video, MIDI, subtitles and many other things along side audio payloads.
- The reference implementation is open, fast, and easy. The Xiph.org Foundation, which shepherds Ogg and Vorbis and other open multimedia technologies, has provided multiple reference implementations that are open source and well debugged. There is a floating point based engine and an integer based engine. There are implementations suitable for embedded devices.
Back to the book…
The publisher of Best of Game Programming Gems has kindly sent me an extra copy of the book, which I would like to pass on to one of you. If you are interested, please leave a comment. A week from today I will select a person at random from the people who expressed interest and mail them a copy of the book. Please note that this means your email address, or some other means of contacting you, will need to be included in the comment somewhere.
Filed under: code, xiph | 8 Comments