Duke Nukem 3D Code Review 128
alancronin writes "Similar to Fabien Sanglard's previous code reviews of other games such as the Quake and Doom line of games comes a review of the code base of Duke Nukem 3D (split out over 4 pages). This will be a very good read for anyone interested in understanding the mechanics of a highly addictive game or anyone that wants to learn more about game design."
Oh, you're going to get an F on that one for sure! (Score:5, Informative)
Most methods have "void" parameters and return "void". Everything goes via global variables.
Methods naming does not use camelCase or NAMESPACE prefix.
Somewhere, my CS professor just had a simultaneous heart attack/stroke.
Re:duke nuken (Score:4, Informative)
http://fabiensanglard.net/quakeSource/index.php [fabiensanglard.net] and http://fabiensanglard.net/quake2/index.php [fabiensanglard.net] as hinted by the summary.
Comment removed (Score:5, Informative)
Re:Oh, you're going to get an F on that one for su (Score:5, Informative)
Which is not what 99% of code does.
I was speaking generally, and generally globals are a bad idea.
Re:duke nuken (Score:5, Informative)
You couldn't run either Quake or Blood without a graphics card, there wasn't onboard video support back then. Presuming you mean a 3D card, neither Quake nor Blood originally supported 3D cards, and so both ran fine without it.
Quake did later get a 3d-accelerated version (glquake), but it was by no means required, and was sort of unofficial (Id Software released it, but it was unsupported).
Re:duke nuken (Score:5, Informative)
Duke 3D was waaay more sophisticated than Wolfenstein. While it did employ similar dated rendering techniques and the need for sprites, it did offer full range of motion along all three dimensions, actual floors and ceilings, interactive environments, the ability to look around using a mouse, and the ability to have passages that could overlap one another. Doom couldn't even do that.
The Quakes were technologically superior, by far. Three dimensional rendering in the truest sense, greater lighting effects, antialiasing (I think that came about with Quake 2, but correct me if I'm wrong). Network play out the wazoo. Even the audio capabilities were incredible. (I used to love putting different CD's in the drive to change up the soundtrack. Megadeth's "Rust in Peace" goes very well with Quake.)
But despite all that, I always had more fun with Duke 3D than I did with Quake. It just had a more colorful personality and it had more creative levels. Quake was always so... brown and gray.
Re:duke nuken (Score:5, Informative)
Duke Nukem 3D was the first FPS to inject a healthy dose of humor into the game. That is what stands out in my mind over actual gameplay mechanics.
DN3D also had a wide variety of weapons, some of which were... standard FPS weapons, some which weren't.
Some of these were pioneered by DN3D, such as:
I should note that I'm focusing mainly on multiplayer things here.