Follow Slashdot stories on Twitter


Forgot your password?
Quake First Person Shooters (Games) Programming Entertainment Games Technology

Quake 3: Arena Source GPL'ed 485

inotocracy writes "At John Carmack's Quakecon 2005 keynote he promised that the Quake 3 Arena source code would soon be released-- turns out he wasn't just pulling our leg! Today it was released, weighing in at 5.45mb, it makes for a quick download and a whole lotta fun. Developers, start your compilers!"
This discussion has been archived. No new comments can be posted.

Quake 3: Arena Source GPL'ed

Comments Filter:
  • by m50d ( 797211 ) on Saturday August 20, 2005 @10:45AM (#13361635) Homepage Journal
    I'd like to get it but don't shop online (I know, I know, I'm being a fool), and I haven't been able to find it anywhere, even second hand. It looks like it was never released on Sold Out or Xplosiv or anything like that. Anyone know if there are plans to do any sort of re-release?
  • by Anonymous Coward on Saturday August 20, 2005 @10:49AM (#13361648)
    So what can be done with this? Since it's the Q3 Arena code, are developers limited to similar games of running around shooting each other? Or, could someone use this code and remake some older game such as Ultima Underworld?
  • by Anonymous Coward on Saturday August 20, 2005 @10:51AM (#13361660)
    You know, AMD, P4, etc.

    Also, will any builds made by us work with punkbuster?
  • Quake 3 Mods (Score:2, Interesting)

    by crache ( 654516 ) <josh AT crache DOT org> on Saturday August 20, 2005 @10:56AM (#13361676) Homepage
    One might assume that with the source being available, popular Q3 mods such as urbanterror could be released as standalone games. However, most mods depends on the PAK files from the game, which have not been open sourced.
  • by Flounder ( 42112 ) on Saturday August 20, 2005 @11:12AM (#13361734)
    I'd love to see a Q3 port of Duke Nukem 3D and Shadow Warrior.
  • Re:Hmm (Score:4, Interesting)

    by bani ( 467531 ) on Saturday August 20, 2005 @11:20AM (#13361767)
    Indeed, it's some of the cleanest C code I've seen laid out to date.


    Cleaner than q1 or q2 maybe, but it is not really a good example of clean / well written C code in general.

    For example, take a look at CL_DemoFilename() for some real "OMGWTFBBQ".

    I can't tell if that code is serious or a joke. But it's there.

    As for stretches of pages of uncommented assembly code -- it's still there. See BoxOnPlaneSide() in game/q_math.c for example. Or S_WriteLinearBlastStereo16() in client/snd_mix.c.

    I really wouldn't use quake3 source as an example of well formatted / readable code. :-)
  • MacOSX Version... (Score:5, Interesting)

    by graffix_jones ( 444726 ) on Saturday August 20, 2005 @11:31AM (#13361819)
    Well, it compiles and runs under OSX, but it's not pretty.

    So far, there's three pretty major bugs that I've noticed in my limited trial.

    1. Trying to ping multiplayer servers crashes the game
    2. Several of the 3D models are really messed up, and some are missing. I was playing against a bunch of bodyless people... all that were present was legs.
    3. The Quake 3 header on the setup screen is missing.

    The odd thing, is that I assumed that since the last build to come out of iD worked great on my G4, that the source would just compile and run without problems... boy was I wrong.

    Of course I compiled under 10.4.2, and I think the last time it was compiled under 10.2.x, so the difference in compilers could probably be the difference.
  • Re:Hmm (Score:5, Interesting)

    by PsychicX ( 866028 ) on Saturday August 20, 2005 @11:32AM (#13361822)
    Ok, admittedly there are stretches where you can feel Carmack's..."magic" work. They clearly wanted to leverage MMX. But, as a whole, the engine is nicely laid out and the architecture is pretty nice. Ignoring the lower level math code -- which frankly tends to look horrendous on ANY engine, due to the MMX, SSE, and whatnot that's usually involved in production code -- things are easy to find and understand. The renderer could still use a lot more commenting as to why it's doing some of the things it's doing (the sky code, for example), but it's really not that difficult to figure it out. No, it's not the best C code on earth. But it is pretty good C code, and besides which it's probably relatively hack free compared to most production source. (It WAS intended for licensing, after all.)
  • Re:porting (Score:1, Interesting)

    by Egregius ( 842820 ) on Saturday August 20, 2005 @11:52AM (#13361950)
    I upgrade a 'fringe OS' to a 'niche OS' as soon as it has Doom and Quake 2 running. For example Amiga, BeOS, RiscOS, Menuet, all niche OSes. Plan 9 would be a fringe OS.
  • Nice (Score:2, Interesting)

    by Gloume ( 581815 ) <gloume@g[ ] ['mai' in gap]> on Saturday August 20, 2005 @11:54AM (#13361967)
    From q_math.c, Q_rsqrt():
    i = 0x5f3759df - ( i >> 1 ); // what the fuck?
    Always good to know that the engine coders don't know what is going on.
  • Re:porting (Score:4, Interesting)

    by alphaseven ( 540122 ) on Saturday August 20, 2005 @11:55AM (#13361973)
    Carmack mentioned during his keynote [] that the PSP should be able to handle Quake 3 level graphics, but I'm not sure if that means it would be able to handle a port of Quake 3.
  • Re:Unreal Engine 4 (Score:3, Interesting)

    by TheRaven64 ( 641858 ) on Saturday August 20, 2005 @11:55AM (#13361977) Journal
    Quake 1 cleanly separated the graphics code from the game code. This means that any Quake 1 mod / total conversion (and there really is no difference between a total conversion and a different game based on the same engine) benefited from every advance made to the graphics code. If you take a look at some of the things being done with Quake 1, you will find that they are quite impressive - particularly when you bare in mind that they are basing it on 10 year old software.
  • Re:Hmm (Score:4, Interesting)

    by bani ( 467531 ) on Saturday August 20, 2005 @12:00PM (#13362011)
    The platform independent code is mostly ok (eg server/ and client/), but the platform specific code is an ugly mess.

    While most of the code in game/ cgame/ ui/ etc are ok, most of the code in unix/ and win32/ is really ugly.

    As for ugly low level C math code (game/q_math.c) most of it is actually pretty clean -- its the gobs of uncommented asm that's ugly.

    The doom3 sdk is much better -- the simd asm code is in general very well commented.

    But there's really little reason to use asm anymore, since the autovectorization in gcc is very nice. It also allows the compiler to optimize much better -- inlined asm functions are hard for the compiler to optimize.

    As for hack free... no.. there are plenty of ugly hacks in the quake3 code. It's the nature of the beast :-/
  • Radiant (Score:5, Interesting)

    by Sludge ( 1234 ) <slashdot&tossed,org> on Saturday August 20, 2005 @12:52PM (#13362323) Homepage

    First off, a big thanks to John Carmack for opening doors for developers... again.

    The most exciting thing about this release is the GPL'd version of QeRadiant included with it. Radiant is a tool that many professional level designers swear by. For the first time ever, it is now available for independents to use when creating content for their own games. Prior to this, you needed a license from Id Software in order to use it for commercial purposes.

  • Re:Nice (Score:4, Interesting)

    by TheRaven64 ( 641858 ) on Saturday August 20, 2005 @01:09PM (#13362445) Journal
    I'm intrigued. If this method is faster than the `standard' one, then why isn't it in libc? After all, math.h only defines the interface, and the C standard only defines the input-output semantics, not the implementation. Is it just laziness / ignorance on the parts of libc developers, or are there disadvantages associated with this approach (other than assuming a 32-bit float size and a specific format for floating point values)?
  • Re:Nice (Score:1, Interesting)

    by Anonymous Coward on Saturday August 20, 2005 @01:33PM (#13362597)
    //NOW close the fucking brush!!

    i = 0x5f3759df - ( i >> 1 ); // what the fuck?

    // fuck, don't have a clean cut, we'll overflow

    // since the cmd formatting can fuckup (amount of spaces), using a dumb step by step parsing

    // fuck, don't have a clean cut, we'll overflow

    // vm fuckage
    // vm fuckage
    //FIXME: this is a fucking mess
  • Re:MacOSX Version... (Score:2, Interesting)

    by graffix_jones ( 444726 ) on Saturday August 20, 2005 @02:08PM (#13362780)
    I just opened the Quake3.pbproj file in Xcode (which needed updating for the new build environment), and clicked 'build'.

    I do have the full version of Q3A installed, so I just fired up the resulting binary and noticed all these problems.

    The first thing I noticed is that the Quake 3 header that hovers back and forth over the setup screen (when you first log in) was missing.

    Normally I try to connect to multiplayer servers first whenever I try out a Q3A update, which crashed the game.

    Next I decided to tackle a single player game with bots, and that's when I noticed that the bots had no bodies or heads... just legs.

    The interesting part is that the collision detection was functioning correctly, because if you tried to shoot where the body was supposed to be, you wouldn't hit anything, however going for the leg shot worked... weird.

    So, I can't really offer any tips, since C is a foreign language to me. In this case I just clicked a button.
  • by OwP_Fabricated ( 717195 ) <fabricated&gmail,com> on Saturday August 20, 2005 @02:59PM (#13362998) Homepage
    It would take a fair amount of writing (but less than writing your own engine from scratch), but you could potentially make just about any kind of game you wanted as long as the engine could handle what you wanted to render.

    I could easily imagine someone making a isometric/topdown RPG like Freedom Force with the Q3 engine. Even though I doubt the Quake 3 engine could handle the wide-open spaces and poly counts, hell, someone could use it as the base engine for a MMORPG or something.

    It's just the amount of additional coding and re-writing you want to do.

    We'll probably just get a really bitchin' version of pong though. Having an engine is one thing, having artistic talent is another.
  • I decided to take a swipe at compiling this on x86_64, but the compiler is choking rather regularly with complaints about pointer to int casts of different size. The code seems to do a lot casts from pointers to int. For instance:

    Emit4( (int )vm->dataBase );

    but dataBase here is a pointer to a byte. It seems like he's probably trying to do something like this:

    Emit4( *(int *)vm->dataBase );

    Is the former line some sort of casting shortcut with the compiler that makes it do the right thing on x86 architecture, or am I missing something?

    Can someone with more C-fu than I comment on this?

  • by RoadWarriorX ( 522317 ) on Saturday August 20, 2005 @08:03PM (#13364132) Homepage
    how much of the Q2 code was "reused" in Q3Arena.
  • Re:porting (Score:2, Interesting)

    by Zzyzygy ( 189883 ) * on Saturday August 20, 2005 @09:06PM (#13364365)
    There's been a call for coders on the Haiku mailing list to port this to BeOS [], Haiku [], and/or Zeta []:
    Sorry for interrupting your scheduled broadcast . . . we will return
    to your regular program shortly.

    The source code for Q3Arena has just been released under GPL. I'm
    willilng to be part of the team looking into porting this to
    BeOS/Haiku/Zeta (well, I've only got Zeta installed, but
    nevertheless), since I've got some experience with OpenGL. Anyone who
    *seriously* wants to participate in getting this beast building under
    the BeOS family (sorry, no offers to beta test yet), drop me a private
    line and I'll see about setting up a freelists mailing list for this
    project. We need to give Rudolf something other than Q2 to test his
    drivers with, since running the same old timedemo must be driving him

    I can be reached at:
    solaja FUNNY_MONKEY_SIGN gmail FULLSTOP com

    We now return you to your scheduled program...
    This is intriguing, I may sign up.

  • by typical ( 886006 ) on Saturday August 20, 2005 @11:20PM (#13364766) Journal
    Carmack also rocks for working on XFree's 3d drivers, releasing Linux versions of his games (probably at a loss) to jumpstart the Linux game market, pushing for OpenGL usage, open sourcing many of his other games...

    It's also really cool that id stayed independent. In a day and age when the normal lifecycle of a game developer looks something like "release, release, release HIT, get purchased by EA", it's refreshing.
  • by zahntorg ( 909069 ) on Saturday August 20, 2005 @11:46PM (#13364856)
    I seem to have successfully commented out some checks from the source so it should be easy to play TCs, without owning the game.

    1. Download the 1.32 Point Release

    2. Download the Quake 3 Demo.

    3. Download my executable (or compile your own) here []

    4. Install the Point Release and demo to separate directories.

    5. Replace the quake3.exe in the Point Release directory with the one you downloaded / compiled.

    6. Move pak0.pk3 from the demoq3 directory in your Demo install to the baseq3 directory in the Point Release install. (This may cause weird problems if you try to play online with the normal game.)

    7. Quake 3 should now be able to play with TCs, or just the demo with custom maps, without complaining.

    I can't guarantee any of this will work, but it seems to have worked for me. The reason for transferring the pak0.pk3 file is that most TCs are not true TCs, but rather use some basic files such as fonts, etc. that they load from the baseq3 directory.

    If you don't have any luck with my executable, you could try producing your own. I only made a few simple changes to files.c. I commented out the following lines:

    // if ( FS_ReadFile( "default.cfg", NULL )
    // Com_Error( ERR_FATAL, "Couldn't load default.cfg" );

    I also commented out the entire function FS_SetRestrictions and just made it return.

    I have not made any changes to cd-key related code, so there may be some more work needed.

    If anyone is having trouble with getting the project files to work on VC++ 6, download the following tool to convert the .NET files to the old format: []
  • Re:Unreal Engine 4 (Score:5, Interesting)

    by John Carmack ( 101025 ) on Sunday August 21, 2005 @02:33AM (#13365346)
    Yes, there was a budget title (Paintball somthing or another) that was developed based on the Q1 source that purchased a commercial license.

    We didn't charge much, but I still think they should have just saved the money and released their source.

    John Carmack
  • Re:Hmm (Score:5, Interesting)

    by John Carmack ( 101025 ) on Sunday August 21, 2005 @02:50AM (#13365387)
    Personally, I think the Q3 code is pretty clean on the whole. It was a commercial product done under time pressure, so it isn't a polished gem, but I consider it good.

    Anyone working on the Q3 codebase today should just delete all the asm code and use the C implementations. Making a commercial game with fairly high end requirements go 10% faster is sometimes worth writing some asm code, but years later when the frame rate pressure is essentially gone, the asm code should just be dumped in the name of maintainability. All the comments in the world wouldn't change this decision a bit.

    >But there's really little reason to use asm
    >anymore, since the autovectorization in gcc is
    >very nice.

    I was pretty much with you until that point. I fully agree that there is little reason to use asm anymore (I haven't written any in years -- Jan Paul did all the SIMD work for Doom 3). Knowledge of asm is good to allow you to manipulate compiler output by changing your C++ code, but there isn't much call for writing it by hand.

    However, autovectorization in gcc is a particularly bad argument against writing asm code. Scalar compiler code is much, much closer to hand codeed asm in performance than compiler generated SIMD code is. Optimized SIMD coding almost always requires significant transformations that compilers can't really do on their own.

    The argument about inline asm hurting compiler optimizations is only true if you are trying to use short snippets of asm, which is generally a bad idea. Asm code that doesn't loop a lot isn't likely to contribute significantly to your performance, with the exception of things like ftol replacements.

    John Carmack

  • by John Carmack ( 101025 ) on Sunday August 21, 2005 @03:03AM (#13365414)
    Thank you.

    John Carmack
  • Re:Hmm (Score:3, Interesting)

    by The OPTiCIAN ( 8190 ) on Sunday August 21, 2005 @07:23AM (#13365928)
    OK - so where *can* someone find good example of C code? I have read that a good way to learn C is to download the source to a program that you respect and then get a feel for that and try and extend that. First three programs I try:
    1) GNU Screen: k&r C, uncommented, undocumented mass of long functions and macros everywhere.
    2) Nethack: k&r C, uncommented, undocumented mass of long functions and macros everywhere.
    3) Vim: k&r C, uncommented, undocumented mass of long functions and macros everywhere.

    Um... is there any application code in C out there that is even written in ANSI C, let alone well commented and understandable to someone new to the program? All the C code I look at seems to be ridden with macros which would seem to be in there for cross platform purposes - but - how do people get a feel for these macros?
  • by Anonymous Coward on Monday August 22, 2005 @03:10PM (#13373759)
    You can't go around generalizing like that. Not all indie developers are out "stroking themselves reading their manifestos". There are quite a few, actually, that work their asses off to create good game content. It's a hell of a lot of work to create a game. And even more work to create a good game.

    Indie developers have to compete with the cream of the crop that comes out of EA or Activision. Comparisons between a 4 man team and a 400 man team abound when critics write their reviews. It's not always a rewarding effort.

    A company like id might be indie, but they enjoy the clout of a commerical dev. They aren't totally in-touch with the indie crowd anymore. I commend them for releasing their engines to the public, but that's the cutoff line for indie when talking about id.

    I make $0 for my product right now. It's an effort of love and dedication and crapshoot whether it'll make any $$$. Carmack and crew make many more dollars because they have a) money bankrolled from previous successes and b) commerical contracts because -- well, because of their name.

    They may have been indie, but they are much further from indie today than when they started.

    - SphericalCow

"Never face facts; if you do, you'll never get up in the morning." -- Marlo Thomas