Slashdot Mirror


Doom 3 Source Code: Beautiful

jones_supa writes "Shawn McGrath, the creator of the PS3 psychedelic puzzle-racing game Dyad, takes another look at Doom 3 source code. Instead of the technical reviews of Fabien Sanglard, Shawn zooms in with emphasis purely on coding style. He gives his insights in lexical analysis, const and rigid parameters, amount of comments, spacing, templates and method names. There is also some thoughts about coming to C++ with C background and without it. Even John Carmack himself popped in to give a comment."

12 of 399 comments (clear)

  1. Beautiful code but by discord5 · · Score: 5, Funny
    • It might be beautiful code, but 90% of it just renders a black screen in a horribly inefficient way.
    • For best effect the source code should be read in the dark with a flashlight in your hand.
    • // TODO : add the code for the lightswitch in this class

    I'll be here all week.

    1. Re:Beautiful code but by djlemma · · Score: 4, Funny

      Don't forget that you can't use your keyboard and your flashlight at the same time...

    2. Re:Beautiful code but by IcyNeko · · Score: 5, Funny

      John Carmack: The Kanye West of Video Game Programming.

      "Imma let you finish your Dragonborn DLC in a minute, but DOOM 3 has the cleanest source code of all time. OF ALL TIME!"

    3. Re:Beautiful code but by Stormwatch · · Score: 5, Funny

      // TODO : rehire Romero, Petersen, Hall, McGee, Prince.

      There, fixed. The engine may be fantastic, but Doom 3 is a horrible game that can't hold a candle to the previous titles. Or at least it can't hold a candle and a gun at the same time.

    4. Re:Beautiful code but by wiggles · · Score: 4, Funny

      Did we play the same game?

      The atmosphere was interesting for the first 5 hours of gameplay, then it just got in the way of trying to play the game.

      I got to the point where, every time I'd walk through a door, I'd look to the side and fire into the demon I *knew* was standing there. It was like the line in Last Action Hero where Arnold walks into his apartment, kid in tow, walks into the bedroom and puts a few rounds into the closet door. A ninja falls out of the closet, dead, and the kid says, "How did you know there was a ninja in there?" Arnold says, "There's always a ninja in there."

      The only discomfort I felt was when I was squinting and cranking the gamma up just so I could see what I was doing.

      The story sucked, too. What do I expect from a FPS? Deus Ex, Bioshock, System Shock, and all their associated sequels, etc. etc.

    5. Re:Beautiful code but by Trax3001BBS · · Score: 3, Funny

      I did. No issues. Hint: The dark parts are supposed to be dark.

      Clue: It's almost a necessity to see what your shooting at, the walls or bad guys.

      Doom 1 FTW!

  2. Re:His Comment by MobyDisk · · Score: 4, Funny

    You remind me of my mom, who ends every political debate by stating that as people become older and wiser they tend toward being Republicans.

  3. Re:His Comment by Anonymous Coward · · Score: 2, Funny

    Republicans implemented in emacs lisp.

  4. Reply with by Anonymous Coward · · Score: 3, Funny

    "Things seem wiser when you become older and senile"

  5. Re:His Comment by meerling · · Score: 5, Funny

    Especially with the rising symptoms of Dementia and Alzheimers. :)

  6. Comments are bad? by Digital+Vomit · · Score: 3, Funny

    "Comments should be avoided whenever possible. Comments duplicate work when both writing and reading code."

    Oh my god, this is the worst programming advice I've ever heard. Is this a joke? Maybe some clever attempt at creating job security?

    There is a terrible dearth of commented code in the world -- especially in the lower-level languages like C and C++ -- and this guy is telling people we need fewer comments in our code?

    --
    Modern copyright is theft of culture from everyone and it retards the progress of the useful arts and sciences.
  7. Re:His Comment by MobyDisk · · Score: 5, Funny

    Mom, I told you nobody mods you up until you register.