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

87 of 485 comments (clear)

  1. Ha ! Bit late uh. by 88NoSoup4U88 · · Score: 5, Funny
    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...

    1. Re:Ha ! Bit late uh. by Ruud+Althuizen · · Score: 2, Informative

      Mirrors can be found here and here.
      A FreeBSD port can also be found here, made by the guy who helped with the FreeBSD XBOX port.

      --
      **TODO** Steal someone elses sig.
    2. Re:Ha ! Bit late uh. by noisehole · · Score: 2, Informative

      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!

    3. Re:Ha ! Bit late uh. by aichpvee · · Score: 2, Funny

      That whooshing sound you hear is the joke flying right over your head.

      --
      The Farewell Tour II
  2. My first hack by daserver · · Score: 5, Funny

    #define cdkey_correct 1

  3. Re:Source Source by The+Ultimate+Fartkno · · Score: 4, Funny

    October 2, 2003, if I read my log... er, recall correctly.

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

  5. porting by jaavaaguru · · Score: 5, Insightful

    I wonder what the most bizarre platform this can be ported to now is?

    1. Re:porting by ciroknight · · Score: 5, Funny

      I dunno about you, but I'm firing up the compiler on my toaster just as soon as I get home.

      --
      "Victory means exit strategy, and it's important for the President to explain to us what the exit strategy is." G.W.Bush
    2. Re:porting by m50d · · Score: 2, Informative

      Doom's been around for ages, and runs on the ipod for starters.

      --
      I am trolling
    3. Re:porting by alphaseven · · Score: 3, Interesting

      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.

    4. Re:porting by TheoMurpse · · Score: 2, Funny

      I'm waiting for the Dead Badger: Arena.

    5. Re:porting by yppiz · · Score: 2, Funny
      You know, I think I'd rather not hear my kitchen appliance say

      Quad toastage!

      first thing in the morning.

      --Pat

    6. Re:porting by Zzyzygy · · Score: 2, Interesting
      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
      nuts.

      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.

      -Z
      --
      My other sig is a Glock
  6. Real download link by cortana · · Score: 5, Insightful

    Anyone fancy posting a link to the actual download, rather than yet another javascript-implemented, advert-laden bullshit fest, registration required download portal?

    1. Re:Real download link by cortana · · Score: 5, Informative

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

  7. Re:So... by Anonymous Coward · · Score: 2, Informative
  8. 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.

  9. hey can i complain too by Anonymous Coward · · Score: 2, Insightful

    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.

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

    1. Re:Hmm by bani · · Score: 3, Interesting
      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. :-)
    2. Re:Hmm by PsychicX · · Score: 4, Interesting

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

    3. Re:Hmm by iamplasma · · Score: 2, Funny

      Get with the times, man. Only old people use that joke, in South Korea...
      So in Communist North Korea, does that joke use old people?

    4. Re:Hmm by bani · · Score: 3, Interesting

      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 :-/

    5. Re:Hmm by k4rm4_p0l7c3 · · 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
                      i = 0x5f3759df - ( i >> 1 ); // what the fuck?
                      y = * ( float * )
                      y = y * ( threehalfs - ( x2 * y * y ) ); // 1st iteration // y = y * ( threehalfs - ( x2 * y * y ) ); // 2nd iteration, this can be removed

      #ifndef Q3_VM
      #ifdef __linux__
                      assert( !isnan(y) ); // bk010122 - FPE?
      #endif
      #endif
                      return y;
      }

      heh.

    6. Re:Hmm by John+Carmack · · Score: 5, Interesting

      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

    7. Re:Hmm by The+OPTiCIAN · · Score: 2, Interesting

      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?

      --


      Believe with me, my saplings.
  11. Do stores still have the game? by m50d · · Score: 3, Interesting

    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?

    --
    I am trolling
    1. Re:Do stores still have the game? by FTDFTD · · Score: 2, Informative

      I found it at Walmart, I believe, for $10 a few months back. I'd assume they still have it.

  12. Thank you by __aajwxe560 · · Score: 5, Insightful

    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.

    1. Re:Thank you by Frogmanalien · · 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 such high esteem that it seems shocking to go into a decent CD/DVD store and not be able to get a classic title from twenty years ago...

      As a personal plea to the software co's out there- please let your old games be free... or at least available to buy! What point is owning a product if you don't sell it?

      --
      The only thing that saves us from the bureaucracy is its inefficiency (Eugene McCarthy)
  13. Mirror without the BS by Anonymous Coward · · Score: 5, Informative
  14. What can be done with it? by Anonymous Coward · · Score: 5, Interesting

    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?

    1. Re:What can be done with it? by FLAGGR · · Score: 3, Funny

      Someone could turn it into a word proccessing app if they wanted to. Depends on how much effort your willing to spend, and how good at coding you are.

    2. Re:What can be done with it? by Flounder · · Score: 5, Interesting

      I'd love to see a Q3 port of Duke Nukem 3D and Shadow Warrior.

      --

      No boom today. Boom tomorrow. There's always a boom tomorrow. - Cmdr. Susan Ivanova

    3. Re:What can be done with it? by The+Ultimate+Fartkno · · Score: 5, Funny

      "I see that you're trying to write a letter. Would you like me to..."

      baaa-WHOOOM!

      CLIPPY has been killed with a RAILGUN!

  15. How about optimized builds? by Anonymous Coward · · Score: 2, Interesting

    You know, AMD, P4, etc.

    Also, will any builds made by us work with punkbuster?

  16. Re:Unreal Engine 4 by PsychicX · · Score: 2, Informative

    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.

  17. Quake 3 Mods by crache · · Score: 2, Interesting

    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.

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

  19. Re:UT forever. by yanos · · Score: 2, Informative

    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.

  20. Re:Unreal Engine 4 by FLAGGR · · Score: 2, Insightful

    Chances that UE3 will be GPL'd: 0
    Chances that Doom3 will eventually be open source (minus that code they had to license or something): 1

    Carmack kics Sweeney's ass. By the way, doom3 etc was designed for - you guessed it - doom3, while UE3 is designed to be used as an engine for lots of games, so its not a fair comparision. But hey, if we're going to throw around numbers, how bout you take a guess at how many games have used the Quake engines? It's pretty damn high.

    p.s. Ubisoft using your engine isn't exactly a selling point. Most of their games are shit tastical. Maybe if they're not coding the engine they'll be able to focus on not sucking, maybe.

  21. And that's why id Software rocks. by HerculesMO · · Score: 5, Insightful

    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 price is always right if someone else is paying.
    1. Re:And that's why id Software rocks. by HerculesMO · · Score: 2, Informative

      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.

      --
      The price is always right if someone else is paying.
    2. Re:And that's why id Software rocks. by typical · · Score: 2, Interesting

      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.

      --
      Any program relying on (nontrivial) preemptive multithreading will be buggy.
    3. Re:And that's why id Software rocks. by lorelorn · · Score: 2, Informative
      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.

    4. Re:And that's why id Software rocks. by John+Carmack · · Score: 4, Interesting

      Thank you.

      John Carmack

    5. Re:And that's why id Software rocks. by Svartalf · · Score: 2, Informative

      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.

      --
      I am not merely a "consumer" or a "taxpayer". I am a Citizen of the State of Texas
  22. Last OpenGL version ? by Anonymous Coward · · Score: 2, Insightful

    Since carmack is choosing the Xbox 360 as his main developmentplatform (Direct3D) does this mean that he will be ditching OpenGL?

    1. Re:Last OpenGL version ? by jericho4.0 · · Score: 2, Insightful

      I would be open to that if it was available on other platforms! But it's not, it's only available on windows, and no matter how you feel about OSS, GNU hippies, and the like, that's not good.

      --
      "A language that doesn't affect the way you think about programming, is not worth knowing" - Alan Perlis
  23. Maybe now the OS X version will be fixed? by solios · · Score: 2, Insightful

    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

  24. News oppt'y for cheating? by ch-chuck · · Score: 2, Insightful

    I already get my butt kicked every time, but won't this allow server operators to make special hacks for their own advantage?

    --
    try { do() || do_not(); } catch (JediException err) { yoda(err); }
  25. Filerush.com torrent by rg3 · · Score: 5, Informative
  26. 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.
    1. Re:Tip for compiling on linux by rg3 · · Score: 2, Informative

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

    2. Re:Tip for compiling on linux by natex84 · · Score: 2, Informative

      i simply did:

      unzip -a quake3-1.32b-source.zip

      -a auto-convert any text files

  27. MacOSX Version... by graffix_jones · · Score: 5, Interesting

    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.

    1. Re:MacOSX Version... by graffix_jones · · Score: 2, Interesting

      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.

  28. Nice by Gloume · · Score: 2, Interesting

    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.

    1. 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
    2. 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
    3. Re:Nice by TheRaven64 · · Score: 3, Interesting

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

      --
      I am TheRaven on Soylent News
    4. 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.

    5. Re:Nice by rjw57 · · Score: 2, Funny

      It's the first guess for finding an inverse sqare root

      I've got an even faster one: x := x * x

      [Note to /-bots, yes I knew what the original poster meant...].

      --
      Rich
    6. Re:Nice by ryszards · · Score: 2, Informative
      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.
      --
      - 'sup, G?
  29. Re:Unreal Engine 4 by TheRaven64 · · Score: 2, Interesting

    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.

    --
    I am TheRaven on Soylent News
  30. eh... no need for perl here by jbellis · · Score: 5, Informative

    find lcc/src | xargs dos2unix

    that's all you need

  31. Sounds good, but... by teamhasnoi · · Score: 2, Funny
    does it compile on OSx86?

    *runs*

  32. Nexuiz is similar... by Lemming+Mark · · Score: 2, Informative
    Take a look at Nexuiz. 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 :-)

  33. Radiant by Sludge · · Score: 5, Interesting

    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.

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

    1. Re:How to compile this on Linux by jcdr · · Score: 2, Informative

      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.

  35. Re:eh... no need for perl here by thrift24 · · Score: 2, Informative

    or just a little shorter

    dos2unix `find lcc/src`

  36. Gotta love grep by zeno921 · · Score: 5, Funny

    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

  37. License problem, GPL/BSD mixed code? by hauk · · Score: 4, Insightful

    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) still Quake3 is licensed under the GPL. Wouldn't this be a problem?

    1. 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.
  38. Effectively, anything. by OwP_Fabricated · · Score: 2, Interesting

    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.

  39. Re:Anything of interest developed with Q 2 source? by generalleoff · · Score: 2, Informative

    http://www.quake2evolved.com/news.htm 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.

  40. Weird... by ReKleSS · · Score: 2, Informative

    I don't get this... id have their own tracker, why aren't they using it....
    -ReK

    --
    md5sum -c reality.md5
    reality: FAILED
    md5sum: WARNING: 1 of 1 computed checksum did NOT match
  41. How to compile with warnings by burnin1965 · · Score: 2, Informative

    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

  42. Compiling on x86_64 and pointer to int casts by PoochieReds · · Score: 2, Interesting
    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?

  43. What I'd like to see... by RoadWarriorX · · Score: 2, Interesting

    how much of the Q2 code was "reused" in Q3Arena.

  44. Re:eh... no need for perl here by harr2969 · · Score: 2, Informative

    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.

  45. Re:bullshit? by bani · · Score: 2, Informative

    Actually I've been working on the Q3 code for a number of years. I wrote this and this for example.

    I wrote the Enemy Territory 2.60 Release 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. You might have heard of this little get together called Quakecon. It was used to broadcast the qualifier and tournament matches.

    Care to tell us what exactly is your experience with the q3 engine code?

  46. Quake 3 executable without checks by zahntorg · · Score: 2, Interesting

    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: http://www.codeproject.com/tools/prjconverter.asp

  47. Re:Unreal Engine 4 by John+Carmack · · Score: 4, Interesting

    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