Thursday, May 28, 2009

The game sound track

Nowadays, most games choose MP3 or OGG for storing and playing in-game musics, indeed it provides the artists full flexibility in the choice of creation tools. However, the data folder will quickly grow when a few MP3 are stored in.

Retro or not, we are using the old Amiga style MOD format for the music in our next game, Super FloboPoP. The format basically contains a list of samples and patterns in which you play samples at different pitch and apply a few sound effects. It's kind like MIDI with the samples stored in if you like. It's the PDF of music formats!

Its strength: a bunch of kilobytes can contains hours long musics. Also a lot of so-called trackers can be found freely all over the internet.

But it have also downsides:
- the so-called trackers are all but intuitive to use by a newcomer and have long learning curve;
- the range of effects you can apply is quite limited (and you must know hexadecimal!);
- the samples are stored as raw sound. They surely could be made lighter with new stuffs like OGG.

I'm wondering if there are alternatives, an ideal tracker-like format, with an open specification and even better: an available open source portable implementation. If I find one I'll let you know!

Thursday, May 7, 2009

Story of a lucky open-source programmer

When I was a student, one of my first hacker project was the badly-called Goom visual effect generator. Incidentally it was also the time I discovered the Linux OS, so I ended up making it a plugin for XMMS, the most popular MP3 player at the time, and released it Open Source.

It became quite popular, being among the best ones available for Linux. I can write pages about its extremely optimized SIMD assembly heart, which made it one of the first true 32 bits advanced plugin (compared to the rotating color palette oldies), but that is not what made it so popular. It became so widely used because of its very simple API and pure C code.

Nowadays, you can launch VLC, mplayer, gstreamer based players (like Totem or Firefox), or Xbox Media Player, and see that Goom already is installed on your computer. You can download it for Windows Media Player, iTunes, Winamp, etc. I'm not responsible for a single one of this ports. I just made goom an easy to integrate, dirty, but pure C code, hidden behind this simple API:

File goom.h

void goom_init(int width, int height);
void *goom_update(short *sound); /* returns RGB buffer. */
void goom_close();


I made no money for years from this project, except a few $15 donations, being able to eat like three time at Mac Donald's. But it helped me more that I could possibly expect.

The first job I found, I found it because one of the open source addict responsible for selecting applications knew Goom. It allowed me to work on exciting graphical research projects for years.

Later, a guy with money needed a guy which knows to program cool stuff. This guy knew Goom, wanted me to improve it, ended up hiring me to write a complete 3D engine.

Give something, you should always hope to be given back one day!