The coolest feature I’ve added to the SSG project so far, by far, is the XM player, ChibiXM.
In a past life, I was an electronic musician with 4 (very limited release) albums. My musical boneyard is pretty huge. And large chunks of it are in a format that can be played pretty accurately by a synthesizer that I have now integrated into my code.
ChibiXM consists of a FastTracker II XM player with a software mixer, written in C, and a thin Objective-C wrapper. I’ve had to poke the C source a little bit because apparently I mixed every module at absolute maximum volume to wring out the last possible decibel of Unz Unz, and the master gain control wasn’t exposed, but other than that it was pretty much good to go. I think I might have had to convert it to ARC too. Maybe. If so, it was so easy that I don’t even remember doing it.
Here’s how you use it:
[[ChibiXM sharedInstance] play: [XMFile songWithName:@"destructo.xm"]];
If you’re not familiar with music trackers, XM is a module format, which means it contains instrument samples (something like WAV files) and instructions for playing them back. Generally speaking, with my stuff, that meant bass kick here, here, here, here, here, here, here, here, repeat.
Unless you have a ton of samples, the module is usually much more compact than introducing an MP3 mixdown of the same music. You give up a bit of CPU and get back a lot of file size. Since you really want your iOS app to be under 50 MB, this is a good thing.
I worked in ModPlug Tracker and Adobe Audition before I tapped myself out of ideas, so those modules are complex and only the final mixdown sounds as I intended. The earlier music I did, mostly in ScreamTracker, converts to XM better. The sound is…surprisingly good.
It’s a huge trip for me, and a showcase for technological advancement. I remember maxing out the CPU on my 80486 with these tracks (256 virtual channels! Pet Sounds only had 8!), but now I’m playing them back on my phone, and moving 500 sprites around at the same time.
WE ARE LIVING IN THE FUTURE. I thought you should know that.
I threw in a song called “Destructo” (created ca. 1996) for testing during title card swaps. It’s an incisive multifaceted commentary on society and my own desensitization to violence that uses machine guns and explosions as percussion. Actually it’s dumber than bricks, but so much fun. For some reason I wrote the Leisure Suit Larry theme into part of a pattern that never actually plays due to a skip command. Why? I don’t know.
However, I’ll need to work on replacing samples. As much as I love to hear “is this how you normally behave, or did you leave you brain at home?” in brilliant 8-bit 8 kHz sound, I’m pretty sure I borrowed that from the Amiga demo scene library, and I need to return it.
Could I create my own replacement sample? The key is the derision in the man’s voice. He knows this is how you normally behave; the brain you left on your bedside table is no help at all. It stitches together the whole panoply of ridiculousness. I practiced the line in the shower, but I just don’t have that smarmy middle-aged announcer voice. Quite. Yet. But there are other vocal templates I can use to get the timbre.
“Winamp! It really whips the llama’s ass!”
Yeah, not bad. But I need something that motivates me more.
“XCode! It’s harder where there is none!”
Closer.
Thanks to the original authors for creating Chibi-xmplay, and to Incubator Games for the nice iOS wrapper. This just made my project ten times more fun.
I’m hard at work on a game. I have an artist working with me who is really bringing this project up to another level.
I’m still in early stages with the technology, because I’m trying to keep my platform choices open, but it’s turning into a mess. I’m no longer a fan of writing code that I could get from a library, and most of the libraries don’t support my platform targets. I think I’ll have to commit to a platform shortly.
This project is referred to elsewhere on this site as Small Space Game, or SSG. Big Space Game, or BSG, is still sitting in the background, waiting for love. BSG is needy and requires a lot of love. My hope is that enough people will be interested in SSG to allow me to make the investment in BSG that it deserves. It may not work out that way.
In the mean time, I’ll try to post on other topics. And finally, when BSG is back in action, I have a huge archive of posts from earlier in development that I’d like to share.
Thanks for stopping by!
I wanted to write my entity system in C.
The project was up to four hash tables and still wasn’t supporting the three basic lookups I need.
Now I am using C++, and I have an artist, and she is doing really great work.
Coincidentally, if I were to know what I was doing, I think it might look something like the above.
I’m negotiating with an artist.
This stuff is getting real. Real real.
I’m seeing more and more awesomeness on Tumblr every day. It feels like there is this groundswell of talent. People are going to have to change the way they think about entertainment and creativity.
Dear other indies: at some point, we’re going to have to join forces. But you know…for now, sow your wild oats. Figure stuff out.
I don’t think this is what Iggy had in mind, but I’ve got an OpenGL window on my desktop and the project is flat C.
I think this is the point where I strike my father down and rule by the emperor’s side.