The Secret of Monkey Island: Special Edition Mac DevDiary

written by admin on May 4, 2010 in Development Diaries

When bringing many games to the Mac, we go through a porting process which involves taking the source code for another platform such as the PC or Xbox and manipulating it so that can run on the Mac with its own set of programming rules.  Over the years,Aspyr has built up a robust porting layer which translates the Windows APIs to Mac APIs behind the scenes, so to speak, which allows us to keep as much of the original game code as possible.  This is the process that we used for porting The Secret of Monkey Island: Special Edition Mac to GameAgent.

Monkey Island was originally released twenty years ago by LucasArts as a graphical point and click game where you take the aspiring pirate Guybrush Threepwood through various adventures.  With the Special Edition, LucasArts remastered both the graphics and sounds to be much more robust and current.  They also added speech voiceovers where the original game just displayed subtitles.  One of the coolest aspects of this game is the ability to switch in real time with the press of a button between the old classic and the new remastered versions.

LucasArts provided us at Aspyr with the game’s source code and assets for us to start with.  With that in house, we were able to perform a code review where we get familiar with how the game is put together and the technologies that it uses.  Monkey Island is really a fairly simple game compared to some of the bigger AAA games we have ported such as Star Wars: The Force Unleashed.  It was interesting to see how the old game’s C code was integrated with modern C++ code.

Everything was pretty straightforward except for the audio engine of the game.  While most of the game worked on the Mac without too much effort, the sound system proved to be the most time consuming portion of development.  The PC version uses a Windows specific API which we hadn’t encountered in any of our previous Mac ports so at first it wouldn’t compile and run with any sounds.  We had the option to either add the XACT sound APIs to the Aspyr porting library or rewrite the sound engine to use native Mac APIs.  Due to time and the complexity of XACT, we decided to go with the Mac’s Core Audio interface.  Getting the basic audio functionality up and running didn’t take very long but whenever you rewrite a big portion of an application, there is a greater chance to introduce bugs.  This case was no exception and the wonderful quality assurance team at Aspyr picked up on several spots in the Mac game where the sound was slightly different than on the PC.  With each bug they found, we had to modify the code to work with another edge case that we hadn’t encountered before.

Another area of the game which needed a little more Mac attention was the control scheme.  The PC game uses the Alt key which is better known as the Option key for Mac users.  The original controls also used a few function keys which are problematic on the Mac because Apple’s keyboards and operating systems have changed over the years.  The newest shipping keyboards combine a lot of functionality on those keys such as changing screen brightness and speaker volume levels.  Typically you need to press an additional key such as Fn and then the F1 key in order for the game to register that you pressed F1.  In order to make the game easier to play, we made some modifications to avoid the need to use the confusing function keys.

Working on The Secret of Monkey Island: Special Edition Mac was really a joy and we couldn’t have had better partners than Lucas.  Not only were they willing to help out in any way but they were also quick to respond to our questions and requests.

Isaac Wankerl
Software Developer