Skip to main content
gamedev.net
🔒 Locked

Quake II source code

Started by ukdeveloper 5 replies 2.3k views
Original Post
ukdeveloper
ukdeveloper
Just a note to let you know that the Quake II source is available for download off FilePlanet. It's written in C, and doesn't look overly complicated to me (my programming is FAR from being the best by the way). It's probably common knowledge that it's available, but I hope that some of you choose to draw ideas and techniques from it.
Max_Payne
Max_Payne
It's been available for quite a long while. I looked at the code, and I must say I find it very bad. Don't get me wrong. I played that game for 2 years, liked it alot, it worked fine apart from 1 unfixed network crash exploit.... But... The code is bad. Comments are rare, organization is chaotic, they use goto, there are sometimes pages of inline ASM for things like collision detection, without a single comment. Carmack programmed the engine mostly by himself, and he didnt do it with teamwork in mind.

My advice is to wait for Quake 3. Since its actually a new engine and not just a rehash of Quake 1, the code might actually be better. Its also a much more powerful engine overall, its alot more interesting than Quake 2.

Looking for a serious game project?
www.xgameproject.com
ukdeveloper
ukdeveloper
Any idea when that'll get released? Hopefully before Quake IV (due Christmas... this year)
Aldacron
Aldacron
Quote:
Original post by Max_Payne
But... The code is bad. Comments are rare, organization is chaotic, they use goto, there are sometimes pages of inline ASM for things like collision detection, without a single comment.


Poeple say this sort of thing way too much. There's nothing wrong with the Q2 code. It's a bitch that things aren't commented as well as they could be, and that can make it harder to follow. But anyone with a solid foundation with C should be able to follow what is going on without handholding. Overall there is quite a bit of structure to the code - it is fairly modular and not chaotic at all. Furthermore, the use of goto does not make anyone's code bad. It's a very handy construct when used appropriately. 'goto is evil' is a popular expression, but the reality is it's only true when people abuse it (which could also be said of many other C and C++ features).

I think most people call the Q2 source 'bad' because they either don't want to take the time to go through it, or simply don't know how. Quite a few people have gone through and done some interesting things with both the Q1 and Q2 source. Unfortunately, programmers can't expect all of their colleagues to write code according using current 'best practices'. Sure, comments are essential on large teams, but even so you will often find yourself wading through lines of code that are either poorly commented or not commented at all, cursing the person who typed it all for causing you to slow down on your project while you decipher his code. If anything the Q2 code is great practice for that. But it's far from 'bad'.
KingsRevenge
KingsRevenge
Anyone have any C++ conversion of the engine thats whatI have been looking for.
Eric Wright o0Programmer0o
Permafried-
Permafried-
In regards to the Quake III source, Carmack recently updated his blog (link on planetquake) stating that due to another developer licensing the technology, he finds it unethical to release it to the public as free source right now considering that company would have spent thousands of $$ on it.

I'd say by the latest mid-summer it should be released, but really by looking at the framework I can't imagine it will be that much different from Quake II in regards to the style. The network code on the other hand is substantially different which should in turn make the download more than worth your while :).

Permafried-
Prefect
Prefect
Quote:
My advice is to wait for Quake 3. Since its actually a new engine and not just a rehash of Quake 1, the code might actually be better. Its also a much more powerful engine overall, its alot more interesting than Quake 2.


Carmack may not be a friend of prose and comments, but he's also not a fool. I highly doubt that Quake 3 is "actually a new engine". Yes, there were obviously a number of changes to the graphics engine, but there's more to an engine than just the graphics. And why should Carmack have rewritten all this other stuff, when there was no good reason to do so - remember, *he* (and many others who have written Quake 2 engine mods) was very comfortable with the code.

Another fact is that at some point, a screenshot was floating around the net that showed a 1600x1200 screenshot of MSVC++ with Doom 3 source code, and an early version of Doom 3 loading in a window. In the various windows, you could see the names of many of the functions that existed in Quake 1 (and probably Doom, too, though I've never looked at the Doom source code).

Considering all this evidence: Quake 3 is "just" an evolution of Quake 2, just like Quake 2 was "just" an evolution of Quake 1, as far as the code design is concerned. Besides, there are several engine mods out there that implement a significant subset of Doom 3-style graphics (though most likely they are not as efficient). These engine mods may be more interesting than Quake 3.

cu,
Prefect
Widelands - laid back, free software strategy

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.