Slashdot Mirror


Quake 3: Arena Source GPL'ed

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!"

15 of 485 comments (clear)

  1. Mirror, sans registration... by Dave2+Wickham · · Score: 5, Informative

    If you don't want to register, but also don't want a capped download: Demon FTP.

    1. Re:Mirror, sans registration... by ctr2sprt · · Score: 3, Informative

      And if you like BitTorrent: FileRush.

  2. BugMeNot by Anonymous Coward · · Score: 5, Informative

    Remember, http://www.bugmenot.com/ to get the download at more than 50KBps without having to sign up.

  3. Hmm by PsychicX · · Score: 5, Informative

    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.)

  4. Mirror without the BS by Anonymous Coward · · Score: 5, Informative
  5. Re:Real download link by cortana · · Score: 5, Informative

    Never mind, here's a link for UK readers.

  6. Re:UT forever. by PsychicX · · Score: 5, Informative

    It's 5MB after it's been compressed into a zip. As you may or may not know, zip compresses text really well.

    The uncompressed size of the source is just over 35MB.

  7. Filerush.com torrent by rg3 · · Score: 5, Informative
  8. Tip for compiling on linux by jayslambast · · Score: 5, Informative
    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.
  9. eh... no need for perl here by jbellis · · Score: 5, Informative

    find lcc/src | xargs dos2unix

    that's all you need

  10. Re:Nice by jericho4.0 · · Score: 5, Informative
    That's Carmacks magic number! Of course it doesn't need commenting!

    It's the first guess for finding an inverse sqare root using Newtons method. We're still waiting for a mathamatitian to tell us if it's the best choice, but it works. That's one of Carmack's claims to fame in the CS world.

    --
    "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  11. Re:Nice by jericho4.0 · · Score: 5, Informative
    (replying to my own post)

    float InvSqrt (float x)
    {
    float xhalf = 0.5f*x;
    int i = *(int*)&x;
    i = 0x5f3759df - (i >> 1);
    x = *(float*)&i;
    x = x*(1.5f - xhalf*x*x);
    return x;
    }
    It runs much faster than math.h, and it's very usefull.

    This paper says that it was first found in the Quake 3 source. I guess it's in the SDK somewhere?

    I wanted to add, too, that this is an example of why companies don't release code. They view things like this as secrets to be kept. Kudos to Carmack for having the confidence.

    --
    "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  12. Re:Nice by bani · · Score: 4, Informative

    the reason why this code isn't in libc is because this code is an approximation (but a good one). suitable for games but bad for scientific purposes.

    there are several reasons why this code exists in quake3:

    1) it was written back before modern FPUs and SSE etc. nowadays doing square roots in hardware is faster, especially if you vectorize. but back in 1999 it wasn't.
    2) it was written for mods to use in the quake vm (quake's bytecode interpreter). an engine trap may have been slower.

  13. How to compile this on Linux by jcdr · · Score: 5, Informative

    Tested on a Debian Sarge:

    # Get the code
    wget ftp://ftp.idsoftware.com/idstuff/source/quake3-1.3 2b-source.zip
    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

  14. Re:License problem, GPL/BSD mixed code? by Anonymous Coward · · Score: 4, Informative
    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, so it shouldn't be a problem. It should be deleted from that file, though.