Wolfenstein 3D: Open-Sourced, iPhoned, Still Full of Dog Food
Posted 03/26/09 at 12:00:00 PM by David Murphy
Wolfenstein 3D—yes, that Wolfenstein 3D—has been a member of the open-source community since programmer and visionary John Carmack tossed the code out into the open in 1995. That’s not news. What is news is his successful attempt at converting the first-person-shooter, practically old enough to have run on punch cards, onto a next-generation mobile platform. The evil Nazis are now Apple-friendly, and you can get the iPhone version of Wolfenstein 3D for a mere $5 from Apple’s application store.

And how did he do it? Carmack didn’t just go back and start hacking into the Borland C and TASM code of the original title. In a sense, he branched his own game. Turning to an open-source variant called Wolfenstein 3D Redux, Carmack used this Wolfenstein OpenGL retrofit as the graphical basis for his mobile release.
As Carmack details in an extensive post on the official Wolfenstein 3D site, jumping from a DOS environment to the iPhone came with a few design and technical challenges. For starters, he had to consider just how true to the original he wanted the new mobile game to remain. The level designs and sprites are all the same between the two versions, as are the included power-ups, weaponry, and enemies. The UI has been completely retrofitted to fit a mobile device, with directional and firing controls occupying the two lower corners.
There's no strafe button, but tilt support has been built into the title for those that don't mind looking like they're performing a gymnastics routine just to escape a Nazi castle. All doors are now of the "walk by it and it opens" variety, and the older concept of player lives and a running score has been replaced by Doom-style percentages of a player's level completion stats.
Beyond that, Carmack made multiple improvements to the code to translate the original Wolfenstein 3D's drawing functionality and ray casting into an iPhone-friendly format. Why's that? He found that later levels in the game that featured a number of displayed items combined with wide, open spaces would destroy an iPhone's frame rates based on how the screen was drawn in the original release.
Carmack also bounced back and forth between slapping OpenGL compatibility on the core Wolfenstein code or using the modified Redux project alongside a few hacks of his own. He ended up opting for the latter, hand-coding in new elements like loading and saving for the mobile release. His workarounds... work, but the code itself isn't as tight as Carmack would have preferred: "I'm still not positive if this was the right call, since the codebase is sort of a mess with lots of vestigial code that doesn't really do anything, and I don't have time to clean it all up right now," he says.
Technical details aside, the full source code for Wolfenstein 3D mobile is available on Id's site. Although Carmack doesn't think that an average user would be able to download and compile the code in an effort to escape the $5 purchasing fee, it's already been done. If you're sporting a jailbroken iPhone, you can fire up the Cydia installer and grab the exact same, $5-on-the-app-store game yourself. And there's nothing Carmack himself can do about it, as the software is completely legal to download. But that's assuming that he wants to do something about it.
Although that news might not bode well for his bank account, Carmack nevertheless hopes that the release of the source code alongside the commercial application will help spawn a bunch of derivative Wolfenstein projects. In a perfect world, Carmack expects enterprising developers to bolt their own add-ons and updates onto Wolfenstein 3D mobile. And as they link back to the original, and Id links to them, Carmack expects a giant Wolfenstein community to take off--just like one of his rocketship projects. "That should turn out to be a win for everyone," he says.
where's the tall guys?
Submitted by devildog on Fri, 03/27/2009 - 2:14pm
The podcasts just aren't the same without you Murph!
HAHA violence? Well maybe
Submitted by Yusonice on Fri, 03/27/2009 - 5:03am
HAHA violence? Well maybe when he's hurt i think the face is bloody other than that, wheres the violence?
Behold, the power of open source...
Submitted by HeartBurnKid on Thu, 03/26/2009 - 1:35pm
Cool, isn't it? Carmack was able to pull code from a source port of Wolf3D that had been continually-updated for new hardware and APIs, rather than having to start from scratch with a pile of 386 code that is nigh-unusable these days. Thus, we get a classic game released quickly for less than a Big Mac and fries. That is what open-sourcing your obsolete tech gets you -- the chance to return to it later. Even if it does end up being "a mess".
Way to go, Id! Your foresight has paid off in the form of more profits for you and a classic game on a new platform for the fans.
It's a great...
Submitted by Beta_Grumm on Thu, 03/26/2009 - 10:36am
My first 3D shooter on a 486DX. I remember my parents being concerned because it was so violent. Well, at least my mom, I'm pretty sure my dad secretly thougth it was awesome! :P
Those were the days.
The First game that I ever
Submitted by Keith E. Whisman on Thu, 03/26/2009 - 9:25am
The First game that I ever used Cheat codes for. Hell it's the first game that I even new that you could cheat at.
Show some respectz0rz
Submitted by plaskon on Wed, 04/01/2009 - 6:56pm
This game is the reason for your $350+ console.
Open GL and the graphics
Submitted by DMI PC Repair on Thu, 03/26/2009 - 4:15am
Open GL and the graphics still suck. Way to go Carmack. Don't you know Iphone apps are the first steps toward the end of your career!! Maybe that Doom movie was a bad idea.
headache
Submitted by Yusonice on Thu, 03/26/2009 - 2:50am
I remembered playing this game till the end when i was young.... I had headache! So many doors and so many turns! Who wants wolf 3d even if its free?
I remember playing it
Submitted by lunchbox73 on Thu, 03/26/2009 - 5:45am
I remember playing it shortly after it was released. I was a senior in high school and played it on my buddy's 386. It blew me away. Sure it's lame now but back then there was nothing else like it. The grand daddy of all first person shooters. Bow down and show some respect.
I remember when i was
Submitted by AntiHero on Thu, 03/26/2009 - 11:40am
I remember when i was younger, playing a bunch of games i had on some cd i got for like 4 bucks in a store along with deer hunter, this was one of them. I felt special because the CD had to be run through CMD.
I don't like Microsoft, I just associate with it.
Feature
Review
Feature
Feature
Feature






