Tuesday, November 13, 2012

Hopkins FBI is WAVing

Another two weeks have gone by, and we've seen further development in the Hopkins FBI engine. The first is that the entire sound system is now implemented. In fact, the bulk of it was implemented in only a single day. Despite my concerns to the contrary, the implementation of sound in the game was extremely simple.. everything is implemented as WAV files, even the music.

Which made it  very easy to code for, since I could use the existing ScummVM WAV audio stream class to implement the playback. Most of the complexity, in fact, came to setting up the necessary sound arrays and queing/status code that the game uses, rather than raw sound code itself . In fact, the game uses an interesting compression tactic for music playback.. it splits up a given music track into multiple different WAV files, and has an index of the order to play the set of fragments in, allowing it to repeat the same WAV file multiple times during the song playback.

So now sound is working, and you can hear all the music and in-game sounds just like in the original. :). The only minor downside is that it's revealed that the different versions of the demo and full game (Windows demo, and both Linux and PC full versions) use different sets of music files, at least for the initial introduction sequence and menu. So we're going to have to have different versions of the different start-up code.
This is what Strangerke is currently concentrating on. He's been able to obtain the Linux full game, and has just finished implementing all the remaining methods that it uses that the demo didn't have. He's now going to start working his way through the game to see if everything works. We'll likewise have to determine any changes for the Windows version in the near future as well.

As for me, I'll be doing some further playing around with the demo to identify any minor remaining issues and trying to fix them as I find them. And of course assisting Strangerke as necessary. Hopefully we'll soon have a completable full game with full sound support. ;)



DrMcCoy said...

"it splits up a given music track into multiple different WAV files, and has an index of the order to play the set of fragments in"

Gob does the same thing for the intro in several games, as an alternative to the AdLib music. :)

Strangerke said...

Of course, all that was too easy.
The Win95 full version uses APC files, including in the speech container, the Win95 demo doesn't have a speech file and is therefore a problem for detection, the BeOS and OS/2 versions use MOD files... That shouldn't be too hard to handle, hopefully... Fingers crossed!