backtop


Print


The interface of Wolfenstein 3D for the iPhone has changed, but the gameplay of the port, hand-code by John Carmack himself, remains true to the original.  (Source: Kotaku.com)
Get ready to kick some Nazi butt -- on your iPhone

When it comes to the gaming industry, few names are as loved or revered as John Carmack.  Mr. Carmack launched ID games, literally hand-coding most of the original Wolfenstein 3D and Doom games.  The optimizations he fathered in the Quake and Doom series set a high bar for engines to come.  Thus when Mr. Carmack announced he was working on a new game for the iPhone, the gaming community naturally took note.

Now that game has been released at last, and it turns out that Mr. Carmack has breathed new life into an old favorite.  In the end, Mr. Carmack has created a hardware-optimized version of the classic Wolfenstein 3D.  The game first started as a port of the Java cell phone game Wolfenstein RPG.  Faced with software rendering inefficiencies, Mr. Carmack took matters into his own hands, finishing code for a hardware-optimized Wolfenstein RPG in only four days, when it was estimated to take a full development team 2 months. 

He writes on a development blog:

When we got the first build to test, I was pleased with how the high res artwork looked, but I was appalled at how slow it ran.  It felt like one of the mid range java versions, not better than the high end BREW as I expected.  I started to get a sinking feeling.  I searched around in the level for a view that would confirm my suspicion, and when I found a clear enough view of some angled geometry I saw the tell-tale mid-polygon affine swim in the texture as I rotated.  They were using the software rasterizer on the iPhone.  I patted myself on the back a bit for the fact that the combination of my updated mobile renderer, the intelligent level design / restricted movement, and the hi-res artwork made the software renderer almost visually indistinguishable from a hardware renderer, but I was very unhappy about the implementation.

I told EA that we were NOT going to ship that as the first Id Software product on the iPhone.  Using the iPhone's hardware 3D acceleration was a requirement, and it should be easy -- when I did the second generation mobile renderer (written originally in java) it was layered on top of a class I named TinyGL that did the transform / clip / rasterize operations fairly close to OpenGL semantics, but in fixed point and with both horizontal and vertical rasterization options for perspective correction.  The developers came back and said it would take two months and exceed their budget.

Rather than having a big confrontation over the issue, I told them to just send the project to me and I would do it myself.  Cass Everitt had been doing some personal work on the iPhone, so he helped me get everything set up for local iPhone development here, which is a lot more tortuous than you would expect from an Apple product.  As usual, my off the cuff estimate of "Two days!" was optimistic, but I did get it done in four, and the game is definitely more pleasant at 8x the frame rate. 

And I had fun doing it.

After completing Wolfenstein RPG, he mulled over porting Quake 3 to the iPhone.  However, faced with optimization difficulties, he decided to go basic and port Wolfenstein 3D -- the grandfather of all shooters -- instead.  Wolfenstein 3D could run on a 286 computer, so an iPhone port seemed trivially.

For inspiration, Mr. Carmack turned to the OpenGL port Wolf3D Redux, which would run on modern computers.  After a failed attempt to get the maintainer of the project to code the game, he again decided to take matters into his own hands.

While a discussion of all his ponderings and improvements is out of the scope of this humble piece, suffice it to say that Mr. Carmack revamped the interface, while trying to "stay true" to the classic.  He also added more optimizations, and in the made a program that was small enough to be under the 10 MB over the air download limit.

One interesting thing that Mr. Carmack found is that the iPhone hardware is extremely powerful, but is held back by Apple's APIs which are, in his opinion, bloated and inefficient.  For this reason, he says the DS holds its own against the iPhone, due to better APIs, despite inferior (according to Mr. Carmack) hardware.

What's next for Mr. Carmack?  He says he's going back to work on the next generation Rage engine, but he's going to port Doom to the iPhone next.  Apple should certainly be overflowing with thanks to Mr. Carmack as it seems likely that more than a few gamers with little interest in the iPhone will now be looking to pick the phone up to get revamped versions of these classics programmed by their original creator himself.

You can read more about the port here.





"What would I do? I'd shut it down and give the money back to the shareholders." -- Michael Dell, after being asked what to do with Apple Computer in 1997
Related Articles







Latest Blog Posts
The Best Android Apps
Saimin Nidarson - May 20, 2017, 6:16 AM






botimage
Copyright 2017 DailyTech LLC. - RSS Feed | Advertise | About Us | Ethics | FAQ | Terms, Conditions & Privacy Information | Kristopher Kubicki