Slashdot is powered by your submissions, so send in your scoop

 



Forgot your password?
typodupeerror
×
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 88NoSoup4U88 ( 721233 ) on Saturday August 20, 2005 @09:39AM (#13361594)
    Releasing the source several years after the game is released, how lame !

    Take a look at VALVe, at least they released the source of Half-Life 2 before the game was released...



    Ohwait...

  • by daserver ( 524964 ) on Saturday August 20, 2005 @09:41AM (#13361606) Homepage
    #define cdkey_correct 1
  • by Dave2 Wickham ( 600202 ) on Saturday August 20, 2005 @09:42AM (#13361611) Journal
    If you don't want to register, but also don't want a capped download: Demon FTP [demon.co.uk].
  • porting (Score:5, Insightful)

    by jaavaaguru ( 261551 ) on Saturday August 20, 2005 @09:42AM (#13361613) Homepage
    I wonder what the most bizarre platform this can be ported to now is?
  • Real download link (Score:5, Insightful)

    by cortana ( 588495 ) <samNO@SPAMrobots.org.uk> on Saturday August 20, 2005 @09:42AM (#13361614) Homepage
    Anyone fancy posting a link to the actual download, rather than yet another javascript-implemented, advert-laden bullshit fest, registration required download portal?
  • BugMeNot (Score:5, Informative)

    by Anonymous Coward on Saturday August 20, 2005 @09:43AM (#13361618)
    Remember, http://www.bugmenot.com/ [bugmenot.com] to get the download at more than 50KBps without having to sign up.
  • by Anonymous Coward
    every time something gets released for free i loved to gripe and complain about something totally ancillary, like the fact that i cant get it fast enough...

    and then i entered the second grade.
  • Hmm (Score:5, Informative)

    by PsychicX ( 866028 ) on Saturday August 20, 2005 @09:44AM (#13361628)
    I've been poking around the source since yesterday afternoon (late as usual slashdot) and it's generally MUCH cleaner than Q2. Things are well organized, categorized, and sensible. The id penchant for clumping a dozen header files into just one continues, but overall it's easy to find the code you're looking for. Hell, it took me 3 days to find the BSP code in Quake 2 because they had called it model_t or some such meaningless thing. I can see why Q3 was so popular for licensing, despite being in C. Indeed, it's some of the cleanest C code I've seen laid out to date. Naturally there are hacks here and there, and a few very weird design things...and the C versions of what would in C++ be inheritance and aggregation are hilarious. Overall though, I think this code is going to go a lot farther than Q1 or Q2 source ever did. Compared to everything else out of id, this source is really quite nice. No stretches of pages of uncommented assembly code. Most functions have documentation if it's not obvious what they do. All of the members of the major engine structs are well commented, for the most part.

    In short, I like. 1 thumb up. (Hey, it's still C, and I'm a C++ guy in and out.)
    • Re:Hmm (Score:4, Interesting)

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


      Lollerskates.

      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. :-)
      • Re:Hmm (Score:5, Interesting)

        by PsychicX ( 866028 ) on Saturday August 20, 2005 @10: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:Hmm (Score:4, Interesting)

          by bani ( 467531 ) on Saturday August 20, 2005 @11:00AM (#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 :-/
          • Re:Hmm (Score:3, Funny)


            float Q_rsqrt( float number )
            {
            long i;
            float x2, y;
            const float threehalfs = 1.5F;

            x2 = number * 0.5F;
            y = number;
            i = * ( long * ) // evil floating point bit level hacking
          • Re:Hmm (Score:5, Interesting)

            by John Carmack ( 101025 ) on Sunday August 21, 2005 @01: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

      • Re:Hmm (Score:3, Interesting)

        by The OPTiCIAN ( 8190 )
        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 everywher
    • Naturally there are hacks here and there, and a few very weird design things...and the C versions of what would in C++ be inheritance and aggregation are hilarious.

      Any examples? Sounds sort of like BS.
      • The canonical example is a struct that looks something like this (not real source):
        struct somestruct_s
        {
        client_s *client;
        server_s *server;

        //do not change anything above this line! The server expects things in that order!
        //----------------
        //below is game specific, edit as you like.
        };
  • by m50d ( 797211 ) on Saturday August 20, 2005 @09: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?
  • Thank you (Score:5, Insightful)

    by __aajwxe560 ( 779189 ) on Saturday August 20, 2005 @09:47AM (#13361640)
    In this day and age of everyone trying to patent this, litigate that, and everything in between, it's refreshing to see a company, that really doesn't have any motive to make any money off of this, AND in an industry where this concept seems somewhat unusual, release its source code, instead of letting this go off into some useless void. Actions like can only help the industry as a whole, as some burgeoning programmer will have many sleepless nights ahead spending his/her own time learning the tips and tricks employed in this source code. Thank you.
    • Re:Thank you (Score:2, Insightful)

      It does seem ironic, especially since just a few comments above someone asks whether you can actually still buy it in the stores (which, having tried, I can confirm is next to impossible) that there are other companies out there who hold onto their intellectual propetry beyond reason. There are so many classic DOS games that would be great to play, but you can't buy. The games industry may have matured, but it still hasn't reached the critical level where (like movies and music) classic titles are held with
  • by Anonymous Coward on Saturday August 20, 2005 @09:47AM (#13361643)
    Mirror [bdash.net.nz]
  • by Anonymous Coward on Saturday August 20, 2005 @09: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
    You know, AMD, P4, etc.

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

    by crache ( 654516 )
    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.
    • In other news, alot of people bought the game, so that doesn't matter. I saw it used at EB games for 10$ the other day. Get off your ass and shell out, jeez.
  • by HerculesMO ( 693085 ) on Saturday August 20, 2005 @10:03AM (#13361707)
    No, id Software doesn't rule because they are open sourcing an outdated graphics engine. There will always be complainers...

    They rule because they are open sourcing it to make room for cheap games based on that engine. Carmack and Co know that they don't have to give the engine out, but the people that follow their games religiously, this is kind of 'giving back to the community'. The fact this engine will be open sourced means that it can also be improved upon, free of charge. Indy developers (mind you, id Software is one of the FEW left) get a chance to develop a great game -- albeit one that lacks a bit graphically compared to the D3 and HL2 standards -- to cater to a niche crowd and make a name for themselves.

    The sheer price to enter the market for game developing is HUGE. Especially when it costs more money to develop a reliable engine than to buy one from somebody else. Those engines can run into the hundreds of thousands of dollars, and for a small gaming firm, or even a lone developer, that entry fee is too high a price to pay.

    id Software should be commended for their efforts to continue supporting open source, make room for solo developers, and help broaden the PC gaming genre as we know it by including those who previously had restraints on their investment into gaming.

    And to those of you assholes who continually compare Doom3's engine to the Source engine, and say it sucks... just write an engine that's even half as good as the Q3 engine, and then maybe you can say what sucks, and what doesn't. Doom3 may not have been graphically spectacular in its own instance, but I have a feeling that the engine behind it will do much of what the Q3 engine did -- pave the way for amazing games, and challenge hardware AND software vendors to up their efforts to support the T&L and effects that the D3 engine is spectacular at.
    • The sheer price to enter the market for game developing is HUGE.

      No, it really isn't.

      http://www.garagegames.com/makegames/ [garagegames.com]
    • 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 Anonymous Coward
    Since carmack is choosing the Xbox 360 as his main developmentplatform (Direct3D) does this mean that he will be ditching OpenGL?

  • by solios ( 53048 ) on Saturday August 20, 2005 @10:04AM (#13361710) Homepage
    Seriously. The last version of Q3A (that I'm aware of, anyway) for OS X has a glitchy, game-crashing plasma gun.

    Oh, and the screen dumps I've taken (multihead, radeon9600) are static, as opposed to game content. o.O
  • Please submit any source ports to Liberated Games ( http://liberatedgames.org/ [liberatedgames.org] ). Thanks.
  • I already get my butt kicked every time, but won't this allow server operators to make special hacks for their own advantage?

    • In the keynote he said they've taken all the punkbuster stuff out, so it can't connect to a punkbuster protected server (not entirely sure how punkbuster works but I can guess). He also said he doesn't know if there will be unforeseen circumstances this way, but they are ready and willing to deal with it if this does cause an influx of cheating.
    • Server operators could always do this without the q3 engine source. All you need is the mod source sdk, released ages ago.

      The release of the q3 engine source doesn't enable server operators to cheat. They could already do that.
  • Filerush.com torrent (Score:5, Informative)

    by rg3 ( 858575 ) on Saturday August 20, 2005 @10:21AM (#13361773) Homepage
  • by jayslambast ( 519228 ) <slambastNO@SPAMyahoo.com> on Saturday August 20, 2005 @10:24AM (#13361786)
    While most of you probably know this, you have to do one thing before compiling the code. The '.md' files in the lcc/src need to be converted to unix end of line characters, otherwise one of the lcc compiler programs will barf. To fix this, jump into the lcc/src directory and run this little perl function on all the files in that directory.
    cd lcc/src

    tcsh
    foreach i (*)
    perl -p -e 's/\r/\n/g' $i.unix
    mv $i.unix $i
    end
    and btw, if there is a nice unix utility that already does this, let me know.
  • MacOSX Version... (Score:5, Interesting)

    by graffix_jones ( 444726 ) on Saturday August 20, 2005 @10: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.
  • 2005-08-19 21:37:02 Quake 3 Source Finally Released (Games,Quake) (rejected)

    Reject submissions, only to post them later...
  • by teamhasnoi ( 554944 ) <teamhasnoi@yahoo.cLIONom minus cat> on Saturday August 20, 2005 @11:24AM (#13362136) Journal
    does it compile on OSx86?

    *runs*

  • Radiant (Score:5, Interesting)

    by Sludge ( 1234 ) <slashdot@@@tossed...org> on Saturday August 20, 2005 @11:52AM (#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.

  • by jcdr ( 178250 ) on Saturday August 20, 2005 @12:22PM (#13362523)
    Tested on a Debian Sarge:

    # Get the code
    wget ftp://ftp.idsoftware.com/idstuff/source/quake3-1.3 2b-source.zip [idsoftware.com]
    mkdir q3a
    cd q3a
    unzip quake3-1.32b-source.zip
    cd quake3-1.32b

    # Transformation for UNIX
    find -type f -exec dos2unix {} \;

    # Compiling
    cd code ./unix/cons

    # Result
    cd install
    find -ls

    # Install the packs
    # You needs to original files!
    # I do not find them in the source.
    cp -a /usr/local/games/quake3/baseq3/* ~/.q3a/baseq3/

    # Playing ./linuxquake3
  • by zeno921 ( 894827 ) on Saturday August 20, 2005 @12:57PM (#13362716) Homepage
    Results of `grep -ri fuck *':

    1. //NOW close the fucking brush!!
    2. i = 0x5f3759df - ( i >> 1 ); // what the fuck?
    3. // fuck, don't have a clean cut, we'll overflow
    4. // since the cmd formatting can fuckup (amount of spaces), using a dumb step by step parsing
    5. // fuck, don't have a clean cut, we'll overflow
    6. // vm fuckage
    7. // vm fuckage
    8. //FIXME: this is a fucking mess
    9. Note: Unix CR/LF in *.dsw/*.dsp fucks up MSVC++.
    10. How the fuck did this happen?
    11. some files, and between their revisions and ours we fuck this up.
    12. break; // dragged backwards or fucked up
    13. // FIXME: this code is a TOTAL clusterfuck
    14. {"rem", "Less than half a fucking man."},
    15. {"rem", "You're fucking dumb! Suck it down."},
    16. // cleaning up after merging and thinks badly fucked up
    17. this could fuck up if you have only part of a complex entity selected...
    18. // FIXME: this bend painting code needs to be rolled up significantly as it is a cluster fuck right now
  • by hauk ( 698641 ) on Saturday August 20, 2005 @01:03PM (#13362757)
    I see quite a bit of BSD licensed code in there or usage thereof. Any BSD license with an advertising clausal is incompatible with the GPL (see http://www.gnu.org/licenses/license-list.html [gnu.org]) still Quake3 is licensed under the GPL. Wouldn't this be a problem?
    • by Anonymous Coward on Saturday August 20, 2005 @05:28PM (#13363758)
      I guess you're referring to this in code/game/bg_lib.c:
      /*-
        * Copyright (c) 1992, 1993
        * The Regents of the University of California. All rights reserved.
        *
        * Redistribution and use in source and binary forms, with or without
        * modification, are permitted provided that the following conditions
        * are met:
        * 1. Redistributions of source code must retain the above copyright
        * notice, this list of conditions and the following disclaimer.
        * 2. Redistributions in binary form must reproduce the above copyright
        * notice, this list of conditions and the following disclaimer in the
        * documentation and/or other materials provided with the distribution.
        * 3. All advertising materials mentioning features or use of this software
        * must display the following acknowledgement:
        * This product includes software developed by the University of
        * California, Berkeley and its contributors.
        * 4. Neither the name of the University nor the names of its contributors
        * may be used to endorse or promote products derived from this software
        * without specific prior written permission.
        *
        * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
        * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
        * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
        * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
        * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
        * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
        * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
        * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
        * SUCH DAMAGE.
        */
      The advertising clause was officially rescinded [berkeley.edu], so it shouldn't be a problem. It should be deleted from that file, though.
  • 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 @07:03PM (#13364132) Homepage
    how much of the Q2 code was "reused" in Q3Arena.

"I am, therefore I am." -- Akira

Working...