Main Page » My Games » Villainmad »

2013/02/25 (Villainmad): I Got The Multiplatform Blues

Created:

Always use secure-HTTP / Unsecure HTTP / Permanent Link

After a week-long slump, it was the work of a few of days to get back in the saddle and finish 90% of the engine's new audio-system. As is typical for this kind of project, the remainder was also 90%.

See, for most of its non-Windows implementations of playing sounds and music, MonoGame uses OpenAL, which lacks certain functionality which XNA takes for granted, such as "play an intro, then smoothly switch to a loop-section and oop it until the sound get stopped", and "announce when it's finished playing a sound in case you need to add another sound after it or do something else." I managed to kludge together a fakey pretend-version of the loop-thing, and added some other interesting features which mostly revolve around smoothly enqueuing other sounds afterward; however, it still requires the use of XNA's DynamicSoundEffectInstance class, which does not exist in any implementation of MonoGame because the announcing-thing is basically its defining feature, so I've kludged together a fakey-pretend version of that, too.1

Slightly more difficult, though, is that MonoGame has different implementations for different platforms (unlike OpenTK, which was supposed to be "compile once, run everywhere"). In other words, if I want to release this game on Linux and Mac, I'm gonna need a Linux and a Mac. The former isn't a problem, if someone can recommend a distro that'll be easy for someone like me to use solely so I can develop a game on it (virtual machines = best), but Mac ... is Mac, and expensive (I mean, "forget hiring someone to do the art assets ..." expensive). I guess multi-platform is going to be a bit longer-term for now. Unless I go completely crazy and make the game in Unity or something? Blah. Oh well, I guess.

1Also, lesson learned: OpenAL does not like threading (defined as "the program does multiple things at once"), and will cause the sound to flip the fricking-fricky-frick out in various incomprehensible ways.

3 Comments (auto-closed) (rss feed)

sRc

I would say Ubuntu being the most prominent distro now (and I think the only one currently supporting Steam as an aside) its going to be the easiest to target. im pretty sure Virtualbox has HW OpenGL now so you should be able to run it in a virtual machine

Maribel

I've a Mac, and willing to do the honours and packaging if necessary.

Though personally I'd say getting it working on one platform so you are closer to shipping something should be a priority. I'm in the "I'm willing to rewrite this as many times as necessary" camp.

Dizzy H. Slightly Voided

Duly noted, both of you. I've done everything that needs doing, anyway; the audio system is OpenTK, so there probably wouldn't need to be *much* more, regardless.