apeiron2.png

Last week, we talked a little bit about the business decisions that prompt Ambrosia Software’s commitment to old platforms and code. This week, Ambrosia’s own bitwise operator, Matt Slot, tells us a little more about what this commitment means to the average coder in the trenches. Is supporting a single product through numerous generations of platforms and OSes an untenable mandate handed down by our short-sighted management overlords? Matt doesn’t think so.

And he should know. He’s Ambrosia’s point-man on porting and maintaining Apeiron X, a game that, with its recent update to v1.0.2, now runs on all Macs — from 68k to Intel, from OS 9 to Tiger. How does one pack all that multi-platform goodness into a single binary?

“Using the magic of bundles,” Matt says. “The same binary runs on all those platforms … using CodeWarrior for 68K and PowerPC classic, and XCode for the MacOS X universal binary. The 2 executables are actually separate, but look like one object.”

“Though,” Matt is quick to point out in good humor, “the 68K support is mostly anecdotal as the only 68K machine we have basically sits in a glass case.”

So are there really enough of these older machines left in circulation to make it worth supporting them? “We don’t really track it very closely, but clearly it’s a shrinking market,” admits Matt. “Mostly people using second-hand computers, such as in the kids’ bedroom or donated to non-profits. People running OS9 haven’t upgraded for a reason — either compatibility, or increasingly, just because they can’t afford new systems every few years.”

If money is an issue, then there’s probably not a lot of financial incentive for supporting older platforms. “It’s rather difficult to present a dollars-and-cents business case for compatibility that far back,” Matt agrees. “The thing is, people who don’t buy the latest hardware or system release, generally don’t buy new software either.”

Ok. But if there’s no money in it, what drives Matt to support the ports? He sums it up in one word. “Hubris,” he says.

“Seriously, the core game is functionally identical to the original version. Most of the hard lifting (graphics, audio, networking) is already handled by the cross platform tools we use in all of our games, and the rest uses Carbon. Sure, our recent games use OpenGL, Cocoa, and other new technologies, but the classics will run as long as Carbon lives.”

Then it hasn’t been a burden, porting Apeiron’s code? “Making the game run under OS X with the Carbon APIs was relatively easy, only a few days,” Matt confirms. “As for the latest update, it’s telling that we only bumped the minor version number while incorporating the change to universal binary. Fact is, converting the CodeWarrior project for XCode took longer than the actual code changes.”

So Apple’s done good by developers when orchestrating these mass migrations. “Without a doubt, we couldn’t have done this without Apple’s commitment to backwards compatibility,” agrees Matt. “If every major transition in the platform required a top-down rewrite, there is no way we could maintain and upgrade our catalog of games.”

But even with Apple’s efforts at backwards compatibility, surely code must suffer. Doesn’t Apeiron’s source include any #if directives and the like that hamper readability? “Quite a few actually,” Matt recalls, “for things like classic Quickdraw vs Carbon, or to isolate input technologies such as HID or CoreGraphics. The thing is, 90% of the game logic remains the same so the pixels get plotted the same. The only difference is in which sound or networking API we are layered on.”

Thus porting Apeiron really only requires paying attention to 10% of the code. But doesn’t it ever get to be too much? Doesn’t Matt ever resent being forced to abandon an old technology in the name of progress?

“There’s no black and white here,” he sagely advises. “All software makes certain assumptions, and when those assumptions change, you need to address them. We call it ‘code rot’ when previously working code doesn’t keep up with the target platform. [For example, in Apeiron] the switch to PPC was only necessary when Apple moved to USB in the original iMacs, and removed the ADB hooks that Apeiron used.”

And that didn’t get your goat? “It’s unreasonable to assume that the platform won’t evolve — older APIs are improved or even replaced, and even well designed applications must adapt. While there are many bumps in the road where great technology was paved over to make way for a mediocre replacement, the platform continues to improve and move forward — things keep getting better.”

And getting better is certainly something all platforms should strive towards. But to me, the more amazing feat is that an 11-year-old game like Apeiron, thanks to the efforts of people like Matt Slot, is still exactly as great as it ever was.