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

Quake 3: Arena Source GPL'ed 485

Posted by CowboyNeal
from the flawless-victory dept.
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 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].
  • Re:So... (Score:2, Informative)

    by Anonymous Coward on Saturday August 20, 2005 @09:42AM (#13361615)
  • 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.
  • 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.)
  • by Anonymous Coward on Saturday August 20, 2005 @09:47AM (#13361643)
    Mirror [bdash.net.nz]
  • by cortana (588495) <<sam> <at> <robots.org.uk>> on Saturday August 20, 2005 @09:49AM (#13361649) Homepage
    Never mind, here's a link for UK readers [blueyonder.co.uk].
  • Re:Unreal Engine 4 (Score:3, Informative)

    by PsychicX (866028) on Saturday August 20, 2005 @09:54AM (#13361673)
    WTF does D3 have to do with this, or UE3 for that matter? According to the timestamps in the source, the last time this code was touched by id (not counting preparations for GPL release) was 2002. And the number of games based on Q3 tech...it's a massive portion of the industry. If you play any FPSes, you've probably played a game based on the Q3 engine. Call of Duty, Jedi Academy, and Jedi Outcast, for example, are fairly well known examples.
  • Re:UT forever. (Score:5, Informative)

    by PsychicX (866028) on Saturday August 20, 2005 @09:57AM (#13361680)
    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.
  • Re:UT forever. (Score:2, Informative)

    by yanos (633109) <yannos@gma i l . com> on Saturday August 20, 2005 @09:58AM (#13361684)
    That's code we're talking about. There is no map, meshs or textures into this, just the code, no data. So it's basicly 5 megs of text into a zipped archive.

    That's not tiny at all.
  • by FTDFTD (859828) on Saturday August 20, 2005 @09:58AM (#13361686) Homepage
    I found it at Walmart, I believe, for $10 a few months back. I'd assume they still have it.
  • by ctr2sprt (574731) on Saturday August 20, 2005 @10:02AM (#13361698)
    And if you like BitTorrent: FileRush [filerush.com].
  • Re:porting (Score:3, Informative)

    by m50d (797211) on Saturday August 20, 2005 @10:02AM (#13361703) Homepage Journal
    Doom's been around for ages, and runs on the ipod for starters.
  • Re:Ha ! Bit late uh. (Score:2, Informative)

    by Ruud Althuizen (835426) on Saturday August 20, 2005 @10:11AM (#13361732)
    Mirrors can be found here [icculus.org] and here [3ddownloads.com].
    A FreeBSD port can also be found here [freebsd.org], made by the guy who helped with the FreeBSD XBOX port.
  • Filerush.com torrent (Score:5, Informative)

    by rg3 (858575) on Saturday August 20, 2005 @10:21AM (#13361773) Homepage
  • by jayslambast (519228) <(moc.oohay) (ta) (tsabmals)> 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.
  • by rg3 (858575) on Saturday August 20, 2005 @10:27AM (#13361802) Homepage
    While not completelly correct, you can use tr -d '\r' to remove CR characters. Another completelly correct way of doing it is to use sed -e 's/\r\n/\n/g'.
  • Re:porting (Score:1, Informative)

    by Ruud Althuizen (835426) on Saturday August 20, 2005 @10:34AM (#13361837)
    Mirrors can be found here [icculus.org] and here [3ddownloads.com] .
    A FreeBSD port can also be found here [freebsd.org], made by the guy who helped with the FreeBSD XBOX port.
  • by jbellis (142590) <jonathan@COMMAca ... .com minus punct> on Saturday August 20, 2005 @10:59AM (#13361994) Homepage
    find lcc/src | xargs dos2unix

    that's all you need
  • Re:Nice (Score:5, Informative)

    by jericho4.0 (565125) on Saturday August 20, 2005 @11:03AM (#13362024)
    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.

  • Re:Ha ! Bit late uh. (Score:2, Informative)

    by noisehole (300584) on Saturday August 20, 2005 @11:06AM (#13362038)
    very nice, compiled just fine, but cant test due no display atm

    heh, guess that native binary runs faster than the official linux one under emulation "RELEASE_CFLAGS=$(BASE_CFLAGS) -DNDEBUG -O6 -ffast-math -funroll-loops -fomit-frame-pointer -fexpensive-optimizations"

    thx for the port!
  • Re:Nice (Score:1, Informative)

    by Anonymous Coward on Saturday August 20, 2005 @11:14AM (#13362069)
    See here [purdue.edu] for a nice explanation.
  • Re:Nice (Score:5, Informative)

    by jericho4.0 (565125) on Saturday August 20, 2005 @11:18AM (#13362103)
    (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 [google.ca] 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.

  • Nexuiz is similar... (Score:3, Informative)

    by Lemming Mark (849014) on Saturday August 20, 2005 @11:25AM (#13362141) Homepage
    Take a look at Nexuiz [nexuiz.com]. It's a free FPS arena game, complete with a selection of levels, player models, weapons, music, sound effects and a range of AI bots.

    The really interesting thing is that its engine is derived from the "Dark Places" engine, which is (in turn) an enhanced Quake I engine. Over the years, the developers of Dark Places and Nexuiz have done an incredible job of bringing this engine up to date and adding high quality eye candy - it's closer to the Q3 engine's capabilities than its modest roots. Nexuiz is at 1.1 release and is one of those GPL games that really show that OSS gaming can work. It's eaten a lot of my time :-)

  • Re:Nice (Score:5, Informative)

    by bani (467531) on Saturday August 20, 2005 @12:17PM (#13362486)
    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.
  • 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 thrift24 (683443) on Saturday August 20, 2005 @12:30PM (#13362571) Homepage
    or just a little shorter

    dos2unix `find lcc/src`
  • by Anonymous Coward on Saturday August 20, 2005 @12:43PM (#13362656)
    Well well well... not really
    Install debug-x86-Linux-2.3/Q3/q3_ui/q3_ui/ui.qvm as install/baseq3/vm/ui.qvm gcc -pipe -fsigned-char -g -Wall -Werror -O -DDEDICATED -DC_ONLY -c debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86. c -o debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86. o debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86. c: In function `VM_CallCompiled': debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86. c:1163: warning: matching constraint does not allow a register debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86. c:1163: warning: matching constraint does not allow a register debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86. c:1163: warning: matching constraint does not allow a register debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86. c:1163: warning: matching constraint does not allow a register cons: *** [debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86 .o] Error 1 cons: errors constructing debug-x86-Linux-2.3/core/dedicated/qcommon/vm_x86. o
    So, it failed with gcc 3.4.3, who's not happy with the asm inlining. I think i need an old gcc... Let's go back to the 2002 year!
  • by jcdr (178250) on Saturday August 20, 2005 @12:50PM (#13362689)
    I sucess with gcc 3.3.5:

    gcc --version
    gcc (GCC) 3.3.5 (Debian 1:3.3.5-13)

    Only get 4 smalls warnings.
  • by natex84 (706770) on Saturday August 20, 2005 @12:57PM (#13362722)
    i simply did:

    unzip -a quake3-1.32b-source.zip

    -a auto-convert any text files
  • by generalleoff (760847) on Saturday August 20, 2005 @03:17PM (#13363285)
    http://www.quake2evolved.com/news.htm [quake2evolved.com] Most advanced Quake II port at the monet. They are currently giving the game a full overhual with high res textures and new models plus full real time lighting.
  • Re:My first hack (Score:1, Informative)

    by Shaklee39 (694496) on Saturday August 20, 2005 @05:21PM (#13363734)
    Quake 3 stopped checking cd keys for online play about 2 years ago.
  • 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.
  • by HerculesMO (693085) on Saturday August 20, 2005 @05:33PM (#13363774)
    id Software is not owned by anybody. They are INDEPENDANT of other owners. For example, look at Blizzard North (World of Warcraft, etc). They are owned by Vivendi. Epic Entertainment (Unreal Tournament) is owned by Atari.

    These are just a few examples. There are very few "INDY" software shops that turn out a decent game, if any game at all.
  • Weird... (Score:3, Informative)

    by ReKleSS (749007) <<mf.liamtsaf> <ta> <sselker>> on Saturday August 20, 2005 @05:37PM (#13363791)
    I don't get this... id have their own tracker [idsoftware.com], why aren't they using it....
    -ReK
  • by burnin1965 (535071) on Saturday August 20, 2005 @06:09PM (#13363905) Homepage
    The build scripts are using -Werror when you do a debug build. Debug is also the default build. So those inline assembly constraint warnings cause the build to error out.

    If you do a release build the -Werror is not used and it should compile. To do a release build the command is ./unix/cons -- release

    Or you can get past the inline assembly constraint warnings by editing the Construct file in the code directory and removing the -Werror from $BASE_CFLAGS = $COMMON_CFLAGS . '-g -Wall -Werror -O ';

    I've successfully compiled using both methods on my Fedora Core 3 box. The gcc -v output is:
    gcc version 3.4.4 20050721 (Red Hat 3.4.4-2)

    So to recap jcdr's tips with my addition, you have:

    wget ftp://ftp.idsoftware.com/idstuff/source/quake3-1.3 2b-source.zip

    unzip quake3-1.32b-source.zip

    cd quake3-1.32b

    find -type f -exec dos2unix {} \;

    cd code

    ./unix/cons -- release

    And from there you have the compiled binary in the install directory.

    burnin
  • by Anonymous Coward on Saturday August 20, 2005 @06:27PM (#13363966)
    Better yet.

    unzip -a quake3-1.32b-source.zip

    Converts all text files to unix while extracting.
  • by Anonymous Coward on Saturday August 20, 2005 @07:18PM (#13364190)
    No, he's trying to use the 32 bits of the 32-bit address as a 32-bit integer, not take the integer at the address. Since there are now 64 bits (8 bytes) in a pointer, you have to either find an Emit8 or do 2 Emit4s with the high and low parts of the address. Obviously, whatever consumes the emission will have to be modified to accept 8 bytes on the other end.
  • by harr2969 (105745) <harr2969 AT yahoo DOT com> on Saturday August 20, 2005 @07:39PM (#13364269)
    The unzip -a looks to be the most elegant with this code from a post above being a close second. To the person who mentioned dos2unix, this is the preferred way of running it recursively.

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

    The find -type f is finding all regular files (as opposed to symlinks, directories, ports, etc... in unix, everything is a file so you need to be specific)

    The -exec dos2unix {} is executing dos2unix on each file found, inserting the name for the brackets. This method executes as each file is found, as opposed to queueing the job until all the files are found.

    The \; terminates the command.. although the backslash is normally an escape code, I think the semicolon is the actual terminator.
  • Re:bullshit? (Score:3, Informative)

    by bani (467531) on Saturday August 20, 2005 @07:42PM (#13364282)
    Actually I've been working on the Q3 code for a number of years. I wrote this [anime.net] and this [anime.net] for example.

    I wrote the Enemy Territory 2.60 Release [activision.com] for Id/Activision under contract with them.

    I've also had the engine source for over a year under contract with Id/Activision so I could write this [anime.net]. You might have heard of this little get together called Quakecon [quakecon.org]. It was used to broadcast the qualifier and tournament matches.

    Care to tell us what exactly is your experience with the q3 engine code?
  • by Anonymous Coward on Saturday August 20, 2005 @10:24PM (#13364788)
    The code in the lcc/ directory is under a GPL-incompatible license that seems to be "noncommercial use only" if the code is reused in certain ways. Is this an extra, or is it required to build/run Quake 3?

    If it is required, it might be a serious problem, since the license is not compatible with the GPL.
  • by lorelorn (869271) on Sunday August 21, 2005 @01:59AM (#13365405)
    They are absolutely an independent developer.

    A successful one.

    Perhaps other indie developers should spend less time stroking themselves reading their manifestos, and more time working on sustainable business plans and a product that will sell.

  • Re:Nice (Score:2, Informative)

    by ryszards (451448) on Sunday August 21, 2005 @01:52PM (#13367261) Homepage
    It's not John's. I asked him the same question last April.
    >Hi John,
    >
    >There's a discussion on Beyond3D.com's forums about who the author of
    >the following is:
    >
    >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;
    >}
    >
    >Is that something we can attribute to you? Analysis shows it to be
    >extremely clever in its method and supposedly from the Q3 source. Most
    >people say it's your work, a few say it's Michael Abrash's. Do you
    >know who's responsible, possibly with a history of sorts?
     
    Not me, and I don't think it is Michael. Terje Matheson perhaps?
     
    John Carmack
    I couldn't track down Terje to ask him.
  • by Svartalf (2997) on Sunday August 21, 2005 @10:51PM (#13369527) Homepage
    If you can't afford the $100 cost to get torque, you won't have any of the other stuff you need to make a game.

    Really now...

    Compiler - GCC. Check.
    Debugger - GDB/DDD Check.
    Network Middleware - Q3:A engine network stack, or OpenPlay, or ADAPTIVE Communications Environment, or... Check.
    Game Physics - Q3:A engine, or Crystal Space, or NeL, or... Check...
    Game Rendering - Ditto...
    Installer - Loki/LGP Installer, Autopackage, NSIS, etc. Check.
    3D Modeler - Blender, etc. Check.
    Sound - OpenAL, FMOD, etc. Check.

    Gee, there seems to be all the tools for someone to make a game in hand for cross-platform development of professional games (HINT: They DO make games with the above stuff and people have bought them- even in recent times...) and all Open Sourced, with no costs whatsoever if you can support yourself.

    Seems to me, you missed the boat somewhere.

Many people are unenthusiastic about their work.

Working...