What’s the state of glulx interpreters for unix/linux? Especially sound-capable ones?
I’m doing compatibility tests for my sound and graphics-using glulx game and at the front of the game, I want to give a list of sound+graphics capable interpreters for Mac, Windows and Unix. I’m not sure what to say for Unix. My research isn’t turning up reliable answers (nor ones I can test. It’s the only system I don’t have.)
If you haven’t got a linux install, and you care about ensuring it works, you should really get yourself a linux install! Through much ingenuity you can even install distributions like Ubuntu as Windows programs: ubuntu.com/download/ubuntu/windows-installer
I believe Gargoyle is the only Glk implementation on Unix that supports sound, and apart from Spatterlight it is also the only one for OS X.
For best results when using Ogg, your sound files should be in stereo and have a 44.1 kHz sample rate, 16 bit samples. Other formats will work but will get piped through the SDL_sound conversion routines, the results of which are passable but deeply unsatisfying. (Sample rate conversions represent the worst case scenario.)
This is a Gargoyle-ism that I hope to eliminate at some point in the future. SDL development has picked back up recently and the forthcoming SDL_sound 2.0 is supposed to have its own mixer capabilities.
I know it’s bad form to encourage authors to work around library limitations and I apologize for that. David Kinder’s mantra of “fix the interpreter!” is appropriate and definitely applies here. But I haven’t been able to find a good alternative to SDL that works reliably on the target platforms, so the best I can do for now is to point out that there’s a “ideal” format for sounds played by Gargoyle and let you make the call.
I use OpenAL with Alure. It may be overkill for Gargoyle, but I find it works well on all platforms. It was a bit of a hassle to compile on Mac (but so are many libraries that’s started on Linux - universal binaries is not something they expect), but otherwise I’ve had no problems and my engine (SLUDGE) runs on all three platforms.
Thanks for that tip. Actually you may have just explained why a piece of music I did for a game at GameJam Sydney this year came out sounding slightly different in game to out of game. The game used SDL.
Good news for my glulx game though is that conveniently, I’ve been going 44/16 for all the ogg files anyway. It’s all working and sounding really good. Gargoyle’s my home base in both playing and testing, since I’m a Mac guy, as you say, the only other sound option is Spatterlight.
I have had just one weird glitch - there’s one ogg file I made that, while being 44/16 and identically created to all the others, when I compile it in Inform, the index says ‘unknown sound format’. But it plays fine in the compiled game. Also none of my ogg players have any trouble recognising or playing it. If I re-ogg the source sound file at a different quality level (just to make a different file), it is recognised. Any ideas?
Seems like a bug with the Inform index. garglk and presumably most other implementations rely on the blorb file to identify the resource type. If Inform’s blorb tool wasn’t recognizing and packing it properly, I doubt it would play at all.
Do you mean in whole kb? The index is kind enough to give tenths of a kb.
Either way, I’ve got 12 oggs so far of all kinds of lengths - EGs: 116.2 kb, 207.2, 108.9, 11.9 - and the index likes them all except this one sound. OS X gives its length as 131kb on disk, or 127,588 bytes in size.