Slashdot Mirror


Code Review of Doom For the iPhone

Developer Fabien Sanglard has written a code review for id Software's iPhone port of Doom. It's an interesting look into how the original 1993 game (which he also reviewed to understand its rendering process) was adapted to a modern platform. "Just like Wolfenstein 3D, Doom was rendering a screenframe pixel per pixel. The only way to do this on iPhone with an acceptable framerate would be to use CoreSurface/CoreSurface.h framework. But it is unfortunately restricted and using it would prevent distribution on the AppStore. The only solution is to use OpenGL, but this comes with a few challenges: Doom was faking 3D with a 2D map. OpenGL needs real 3D vertices. More than 3D vertices, OpenGL needs data to be sent as triangles (among other things because they are easy to rasterize). But Doom sectors were made of arbitrary forms. Doom 1993's perspective was also faked, it was actually closer to an orthogonal projection than a perspective projection. Doom was using VGA palette indexing to perform special effect (red for damage, silver for invulnerable...)."

6 of 161 comments (clear)

  1. Classics never die by adosch · · Score: 5, Insightful

    I remember playing Doom in the mid-90's on my friend's Gateway 2000 Pentium 100Mhz. I still play it to this day from time to time (openGL port on Linux). It's mindless, self-indulging, gory, non-challenging (now, not then!), and it's becoming one of timeless those FPS games that won't die because it's story line is simple and not drug out, you're thrown right into the mix and you can keep your objective as simple as you want: Make it to the end of the map.

    1. Re:Classics never die by Antiocheian · · Score: 5, Insightful

      The groundbreaking REAL 3d game was Ultima Underworld. Amazing story, great music and paced to the action (due to midi synthesis) and total 3d immersion.

      Pay your respects to Looking Glass.

    2. Re:Classics never die by gregmac · · Score: 3, Insightful

      This is also in a game where you can get hit by a rocket and live if you have enough health. And take a few hundred bullets from a simple 'machine gun'. And jumping from a ledge 6 times your height? No problem.

      If it was realistic, you'd be dead from the first

      --
      Speak before you think
  2. These are implementation notes, not a code review by HisMother · · Score: 3, Insightful


    This isn't a "code review" -- it's a short monograph (with Quicktime movies!) that talks about how Id got DOOM working well on the iPhone. A "code review" is, well, a critique of code, and the style, correctness, and efficiency, thereof.
    </pedant>

    --
    Cantankerous old coot since 1957.
  3. What's with this CoreSurface licensing restriction by mikelieman · · Score: 4, Insightful

    The only way to do this on iPhone with an acceptable framerate would be to use CoreSurface/CoreSurface.h framework. But it is unfortunately restricted and using it would prevent distribution on the AppStore.

    Now this is what really annoys me. Here are tools. Appropriate tools. But you aren't allowed to use the tools, because what you're going to use them for offends The Gods.

    What was that RMS was saying again?

    --
    Technology -- No Place For Wimps! Grateful Dead and Jerry Garcia Chatroom -- http://www.wemissjerry.org
  4. Re:What's with this CoreSurface licensing restrict by slim · · Score: 4, Insightful

    What was that RMS was saying again?

    Don't bring attention to RMS's pragmatism. It confuses those who prefer to think of him as a hippy.