Hacker News new | past | comments | ask | show | jobs | submit login
Wolfenstein 3D for iPhone engine code review (fabiensanglard.net)
67 points by twampss on April 23, 2009 | hide | past | favorite | 11 comments



"It's pretty amazing that some stranger can exchange [email] with one of the gods of programming."

I think that sums up the whole Wolfenstein 3D for iPhone creation - nostalgia cool, geeky cool, and transparently cool.


This is a nice article that gives great detail on how the new Wolf3D for the iPhone works. However, I couldn't help to notice how the mostly artificial limitations Apple puts on iPhone development using the App Store hinder development, and delay porting of games to the iPhone. I wish they would just open it up and allow us to do whatever we want with it, to some extent. "Private" and "Undocument API calls" being forbidden is on par with any evil thing Microsoft has ever done.


Not allowing the use of Private and Undocumented API calls allows Apple to change that implementation without worrying about breaking 3rd party software. I don't think there is anything evil about that.


It sure saves them from the backwards compatibility problems Microsoft has to deal with. If you know the SimCity anecdote you know what I mean.


What's wrong with denying access to private and undocumented API calls? They're private and undocumented for a reason - if there is something you need to do that the SDK does not support, that's Apple's problem and they need to fix it. Using private API calls to hack around the problem just causes problems later when the implementation inevitably changes.

Hell, this is the whole problem with Windows and why it's so screwed - it's gone through years of lazy hackery with people invoking undocumented APIs, to the point where removing these functions is causing high profile software to break in nasty ways. If anything I think they need to add deprecated API calls to the list of banned things in new software - that's another thing that's holding Windows back, the fact that perfectly recent software is still calling ancient, long-deprecated API.


Bear in mind that, in addition to concerns about maintaining compatibility, there are other companies who influence what features of the phone can be used directly by third-party developers.

Apple has spent many years and millions of dollars establishing these relationships and isn't going to jeopardize them to make it easier for someone to write a game for the phone, especially when it can be done with clever coding instead.

Smart hackers tend to enjoy working around such limitations.


I understand where you are coming from, but...

I wrote a bit of code on the Symbian platform -- the iPhone is a big step forward. It was much more expensive and painful to get applications signed on Symbian, especially if you wanted to run on many types of phones.

I think the background here is prior to OS X versions of the Mac OS. Lots of apps patched system calls etc -- and it was Hell to make new versions of the O/S (Microsoft was "famous" for breaking all coding guidelines in Word et al and e.g. patching system data structures directly). This was a big contributor to Apple's problems making the next version of the Mac OS.

(Excuses in advance for memory errors; this was some time ago.)


I'd love to read more of these code review style posts. Does anyone have any other good ones?


Thanks for the comments ;) !

I've done a code review of Quake1:

http://fabiensanglard.net/quakeSource/index.php

Most of the informations are still valid, Quake2 and Quake3 were improvements of the same base.


Thanks, I see you have a couple of my favourite books The C P rogramming Language and Masters of Doom. I'll be reading the rest of your blog. Love the clean design!


Ha!

"Is NSTimer the only way to perform animation on this #*! iphone ?"




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: