by fzammetti » Apr 15, 2004 @ 7:11pm
I've used Hekkus in two projects now, Invasion: Trivia and K&G Arcade. I:T was PF-based (pre-PHAL) and K&G is GD-based (3.0).
From a technical standpoint, getting Hekkus into your project is a trivial exercise. You'll probably spend more time getting your project environment set up to use it than actually writing code!
I choose to NOT use the modified game class for either PF or GD, I integrated Hekkus myself. I like this approach better because it allows me to upgrade one library or the other independantly or the other, without having to wait for anyone to provide the updated class.
It pretty much amounts to a single call to initialize Hekkus at app startup, then it's just loading WAVs, MODs and whatever else (as little as a single line, looking very much like loading a surface in either library). You'll also want to hook the minimize/maximize event handlers to suspend and resume Hekkus (again, a single line of code each). Pretty much three lines of code is all you need to get Hekkus up and running, after your environment is set up for it of course.
Playing a sound, be it a WAV file or MOD file, again is, you guessed it, a single line of code! Most of the time I suspect you won't have to worry about channels and such, just tell Hekkus to play your sound and be done with it. The exception is looping sounds that you know you'll need to stop later. In that case you'll need to record the channel it gets played on so you can stop it later (assuming your not going to just do a stop all), but we're talking trivial things here.
I can tell you that Hekkus is fantastic performance-wise. I've done tests to see how much of an impact it actually has and the result every single time has been that it's not worth even thinking about. This is with a number of WAVs playing over a background MOD by the way, so load isn't an issue, at least not that I've seen (50 WAVs at once might be a problem!)
Memory-wise, the latest versions are better than the older ones (I think Thomas did some work to cut down how much memory a WAV uses, not a huge difference but still). There is also ADPCM compression built-in, which made life so much better coding K&G Arcade!
In my mind, I looked at MikMod early on and found it a bit more difficult than I would have liked (simplicity is a big plus of Hekkus... it's easy to get working initially and easy to understand). FMod I had much the same reaction to as MikMod.
In short, the price can't be beat and Thomas has done a tremendous job putting this thing together. If you need all the effects and such that FMod supports, then there's not much comparison. But if your looking to play some WAVs and/or MODs and want something efficient, inexpensive and easy to use, Hekkus I truly believe is unmatched. I think you knew all that though...
Technical gotchas to be on the lookout for? None that I have encountered. It has really been smooth sailing with Hekkus. Oh yeah... Previous versions did get flagged by one or two code checkers that I use (DevPartner, Entrek, etc.) for some things, but the latest versions get through free of any flags. They may have been false positives previously, but it looks very clean now, so by all means grab the latest version!
...and so I said to Mr. Gates: "$640 billion should be enough for anyone!"