View Full Version : Quake 3 source released - XCode project included
MarkJ
2005.08.20, 08:23 PM
id GPL'd the source to Quake 3 Arena the other day, and it comes with a project builder project! I'm compiling it right now. The code seems to be a gigantic mess of C, but not altogether terribly undocumented.
Here's a link: ftp://ftp.demon.co.uk/pub/mirrors/idsoftware/source/quake3-1.32b-source.zip
unknown
2005.08.20, 08:28 PM
heres another
http://www.fileshack.com/file.x?fid=7547
http://0day.icculus.org/mirrors/quake3/quake3-1.32b-source.zip
It builds!
havent got it running yet though...
It changes resolution and give me a white screen with the cursor,
the error seems to be
ERROR: User Interface is version 3, expected 6
Blorx2
2005.08.20, 09:26 PM
Cool, I'll have to get this tommorrow
Built first try (what a surprise!),
Ran first try (an even bigger surprise)!
Some weird things were going on though, like the main menu logo missing and models only showing half their body.
unknown
2005.08.20, 09:42 PM
Jake, What install directory did you give it?
I gave it a copy of the stuff from the cd.
Steven
2005.08.20, 10:03 PM
Just a warning to people who don't realize: this is the game SOURCE only, you still need the data files from a real Q3 retail copy...
And I was pretty impressed when it built and ran first time too :)
unknown
2005.08.20, 10:07 PM
I am pretty annoyed that its not working, im using Quake III Arena, what are you using steven?
Steven
2005.08.20, 10:11 PM
Well, see, I don't own Quake 3 and didn't think about checking to see if it came with game data files until after I built and executed it... ;)
Hence the warning...
I'll bet it's in the bargain bin by now, maybe I'll pick it up on my next trip out to Fry's...
unknown
2005.08.20, 10:21 PM
God dammit, It builds and I get a white screen, If I change the code a bit I can watch the id intro then the game intro with sarge and then see a black screen and if I move the mouse about I can hear the menu sounds.
At least I can build custom games and cgames again to make mods and use omnigroups port, I lost the mod sdk a while ago.
Jake or anyone who manages to get past the intro movie, what version of quake 3 do you have installed? any patches?
Jake, What install directory did you give it?
I gave it a copy of the stuff from the cd.
I just dragged the new .app into my old quake 3 folder. Make sure your quake is version 1.32 , because it probably looks for new .pk3 files.
unknown
2005.08.20, 11:03 PM
Hooray!
Once I downloaded Omnigroups port It installed all the updated pk3 files, they updated the UI version and stuff.
That is a shocking bug, they must have noticed that everyone is halved and there was no q3 logo and stuff, I hope there's a fix soon. Does only occur with the G4 version for me though.
Also it doesnt take numpad input in the console and I did devmap q3dm17 and it wasnt drawing any guns or projectiles, this sucks.
Well I found it again,
http://www.netwolf.free.fr/mac-qvmtools/
Anyone know how to make qvm files with the newly released quake3 source?
OneSadCookie
2005.08.21, 06:09 AM
Working fine off the bat for me here, other than constant Com_sprintf overflow errors being printed to the Q3 console -- Quake 3 G4 Application, Deployment.
blobbo
2005.08.21, 09:07 AM
So is the code any good? Any secrets to be gleaned? What does this bode for other OSS engines (Chrystal Space, et al)? How soon until we see a complete OSS Quake Mod?
AnotherJake
2005.08.21, 02:12 PM
>So is the code any good?
It's probably the largest and most successful codebase done in C that we'll ever see, so I suppose it is. I personally think it's more readable than Q2 is, if that's what you mean. Still, it's pretty massive. I've been staring at it for the last day and it's hard to get ones bearing.
>Any secrets to be gleaned?
Probably. I was looking at some of the CD checking stuff and learned a few things.
>What does this bode for other OSS engines (Chrystal Space, et al)?
It bodes well, if anything, I think. Being as how Q3Radiant is included, I'm sure we'll see most other engines adopting the file format for the levels it spits out. I've heard that it's widely considered the best level editing tool in the industry. I haven't seen it myself.
>How soon until we see a complete OSS Quake Mod?
Since this is the whole enchilada, I don't know if you can consider them Mods anymore. Since all the content creation tools are available for Q3, I would take a wild guess that it won't be long before we see some cool stuff come out of it. Plus, even though Q3 is pretty old now, it still seems to have enough features and capabilities that it's much more appealing than Q2 was when it was open-sourced.
I don't think there is a Q3Radiant build available for the Mac yet. Maybe someone knows better? Seems like that might be the first big thing to accomplish on the Mac side of things.
nabobnick
2005.08.21, 02:22 PM
Big suprise for me was keyboard handling. Instead of overriding NSApplication they use a normal NSApplication but intercept the events in a custom loop after applicationDidFinishLaunching. Plus for some reason they are using the lower level system events to track the mouse buttons (maybe because you can detect more than 3 buttons on your mouse?). That's all I've looked at so far.
unknown
2005.08.21, 03:42 PM
The guy who built it is called zaphod, there is a config file called zaphod.cfg in the pak0.pk3 files!!
Ive had more success with a unix version of the mod sdk that was release ages ago than this for building custom qagames and cgames and stuff, does anyone know why they are in .bundles?
OneSadCookie
2005.08.21, 06:42 PM
GtkRadiant already works on the Mac (under X11, but hey, it's usable).
http://www.qeradiant.com/
unknown
2005.08.21, 07:10 PM
It doesnt work on my computer, but I have XDarwin installed is that possibly the reason, I thought XDarwin was X11.
AnotherJake
2005.08.22, 01:29 AM
I had totally forgotten about GtkRadiant. I wonder if GtkRadiant's existence was one of the motivations for releasing the source for Q3Radiant, since it's kinda already out there anyway? Also, I wonder if it's even worth it to bother with the Radiant source on the Mac if GtkRadiant will presumably be taking advantage of the 'real deal' now that it's out?
On a slightly different Q3 content subject - I don't know a whole bunch about this, but as I understand it there is still no (affordable/free) way of making Q3 models on the Mac. Even if GtkRadiant is sufficient for level design, is there a good solution for models? I'm thinking along the lines of Milkshape I guess. I don't think Radiant does models does it?
[Edit] I guess I'm trying to assess what would be needed for a complete workflow using Q3 on the Mac now that the source is out. What are the holes? What would be needed to fill them? Would it be worth the effort to get the complete workflow happening on the Mac, or is it more effort than it's worth to just recommend everyone buy a PC to develop content for Q3? Would it be worth it for us (the iDevGames community) to ask somebody like Aspyr what they think about this? Maybe they could help by outlining what is needed, if they think it would be fruitful that is. I don't know, I'm just bouncing some ideas around right now I suppose.
AnotherJake
2005.08.22, 02:44 AM
A thought/question on the licensing front - It's GPL'd which essentially means that you are completely allowed to resell whatever you make with it as long as you include/make available (for free electronically or maximum shipping distribution cost of $10 as I recall) the source code to the product. I don't think that applies to whatever content you make yourself does it? IOW, let's say Joe Cool Software made a game with Q3 and sold it with all the source code they used to make it with, including all the *special secret*[/sarcasm] code they added, but didn't allow redistribution of their models/levels/artwork... How would this not make for a really great commercial development pipeline? What's to lose? You can take whatever you want of the source code 'cause I guarantee it ain't gonna be special, but without the assets, what good is it?
If this is true, then for the price of a PC (to make content) you can make your own commercial game for the Mac now using the same game engine as most of the AAA First-Person Shooter titles currently available on the platform.
It always seemed to me that the sucky thing about the commercial feasibility of the GPL is that no one would buy your game if they could make it from your own source legally. But it seems I may have missed an important point. They can legally make the executable but they can't legally play it without paying for the content (if that's the way you want it). Is this correct?
akb825
2005.08.22, 03:00 AM
Is the content even included? I was under the assumption that it only includes the source, but the actual content is still copywrited.
unknown
2005.08.22, 03:09 AM
You need to have the pk3 files, in the baseq3 folder. So you do need to own the game to play it still.
Frank C.
2005.08.22, 03:12 AM
Is this correct?Yup. In the QuakeCon keynote Carmack said he's looking forward to some day seeing somebody ship a commercial title with GPL source included (based on Q3 or otherwise I suppose).
One thing that's uncertain at this point is if GTKRadiant can be used for commercial game content. According to its current license it can't (well, unless you pay) which is presumably why Id GPL'd the Q3Radiant source. There's some confusion over this since GTKRadiant is a derivative of Q3Radiant, but it forked while Q3Radiant was still proprietary.
FreakSoftware
2005.08.22, 03:44 AM
as I understand it there is still no (affordable/free) way of making Q3 models on the Mac.
There's a Blender plugin for MD3 exporting. I'm not positive that it's bullet proof (I haven't even modeled a cube in Blender yet, unfortunately), but it seems to be used by a number of people.
I guess I'm trying to assess what would be needed for a complete workflow using Q3 on the Mac now that the source is out. What are the holes? What would be needed to fill them?
AFAIK, there are none.
Would it be worth the effort to get the complete workflow happening on the Mac, or is it more effort than it's worth to just recommend everyone buy a PC to develop content for Q3? Would it be worth it for us (the iDevGames community) to ask somebody like Aspyr what they think about this? Maybe they could help by outlining what is needed, if they think it would be fruitful that is. I don't know, I'm just bouncing some ideas around right now I suppose.
My biggest question right now is, do I work on my own engine, or do I start using Q3? I'm very very much leaning towards the latter. I was planning on using MD3 and BSP in one of my games anyway. I'm actually very excited about this, but I need to find the time to learn how to use Radiant (I've learned a little) and Blender (I've learned next to nothing). I'm not sure how much coding would be involved in making the game idea I have a reality, but one thing's for sure: the 325,000+ lines of code in the Q3 source is a lot more than I could ever hope to write in my own engine right now.
It always seemed to me that the sucky thing about the commercial feasibility of the GPL is that no one would buy your game if they could make it from your own source legally.
If World of Warcraft could be compiled by open source I can assure you that 99.997% of the people would still buy the boxed copy because of the hassle. But I think you might be right about the assets
PowerMacX
2005.08.23, 12:39 AM
If World of Warcraft could be compiled by open source I can assure you that 99.997% of the people would still buy the boxed copy because of the hassle. But I think you might be right about the assets
...except it will only take one of us to compile it and post a binary for everyone to enjoy. ;)
akb825
2005.08.23, 01:16 AM
There's still the question of content. That's why people would have still had to buy Quake III even if it was open source from day 1.
FreakSoftware
2005.08.23, 02:27 AM
There's still the question of content. That's why people would have still had to buy Quake III even if it was open source from day 1.
Legally anyway. :)
UnifiedMac
2005.08.23, 03:26 AM
I have an origonal Quake III Arena CD for PC, could I get the content off that so it would be able to run?
OneSadCookie
2005.08.23, 03:40 AM
Yes, the data files are compatible.
AnotherJake
2005.08.23, 03:49 AM
There's still the question of content. That's why people would have still had to buy Quake III even if it was open source from day 1.
That's the million dollar question (poor pun intended). My current observation is that we as developers are not lawyers, and until someone takes the lead and proves that there aren't any hidden gotchas behind making money with it, most programmers are gonna chicken out. - NOTE: But of course none of that will ever happen on the Mac without a complete tool chain first.
FreakSoftware
2005.08.23, 04:53 AM
As soon as I have time, I'm going for it. I don't know when this will be, but I've poked around the source code for a few hours already and it isn't too bad to read. It's hard to know where to start though. In other words, ok, I have the code, but now what? It's huuuge. What parts are reeeally game specific and what parts are really the engine? There's no documentation on the scripting parts of how Q3 works so that'll have to be figure out from the code.
akb825
2005.08.23, 06:51 PM
Legally anyway. :)
It would be no different from simply getting the app off of a friends CD or burning a copy for yourself.
FreakSoftware
2005.08.23, 11:05 PM
It would be no different from simply getting the app off of a friends CD or burning a copy for yourself.
I don't know what your point is.
akb825
2005.08.23, 11:29 PM
If it's open source, but the content isn't included, you could steal the content from a friend's disk or download the image to get the content, and build the app. If it's closed source, you could steal the content and the app from a friend's or download the image with both. Either way, it's the same whether or not it's open source.
Sorry, I wasn't trying to say that you didn't get it, I was quoting you for context. I wanted to clarify my point earlier about how it doesn't matter whether or not it's open source as long as it's still necessary to buy the content.
FreakSoftware
2005.08.23, 11:39 PM
Ohh... Ok. Yes, I agree with you. The only downside to it is that if you do something tricky, someone else can view your code, see what you did, and use that same code in their product. That's also a benefit though, as you can steal others' code. The real question is, are you the guy who's going to be writing the tricky code, or the guy who copies everyone else's?
FreakSoftware
2005.08.23, 11:46 PM
AAAAAAAAllllllllllsooooooo................ 3rd party people can use your code and just replace the content with open source versions to make the same game and release that for free. Is someone really going to do it? Depends if it's a cool enough game, I suppose. It's almost like mods, but even with mods you still have buy the binary to run them where as with GPL'd code, someone just takes it, builds it, and off they go.
I don't like GPL very much, but I think it's worth it for Q3 if someone writes a better shader implementation and shadows etc..
BTW: GTKRadiant is $5,000 US to license from id Software for a commercial project, $10,000 if you want limited tech support. I know of one game in this community that's made over $10,000 with very little effort to get the word out and sell some copies, so, $5k for a good project seems pretty reasonable to me. Anyone wanna loan me $10 grand? I need the other $5 to hire some artists. :)
akb825
2005.08.24, 03:33 AM
Um, didn't Quake III come out before shaders were even implemented into OpenGL? So I think it would be more like *any* shader implementation. :p
OneSadCookie
2005.08.24, 03:43 AM
"shader" has too many meanings.
Quake III has a shader system which uses simple multitexturing and blending to achieve its effects.
I suspect that replacing it with something that uses GLSL or ARB_vp/ARB_fp wouldn't be too difficult.
Adding proper shadows to everything, though, might be.
FreakSoftware
2005.08.24, 03:47 AM
The shader system in Quake III also does the spinning fans and texture animation... go figure. :)
akb825
2005.08.24, 02:22 PM
Hey, at least you could still write shaders for per-fragment lighting. :p If you want to add shaders for the sole reason of adding shaders (vertex and fragment programs), per-fragment lighting is always available. ;)
Taxxodium
2005.08.24, 02:34 PM
Now if Omnigroup would release the source code for Oni, we could play it again on OS X.
I just saw that the Omnigroup has made a more recent update of the oni application which now is fully playable in OS X
I still have problems trying to start my compiled quake 3. I only get a white screen. I have no idea what version my PC quake 3 is, and I can't find that omnigroup port. (only a demo)
Is there a osx binary somewhere that I can download and use that works on osx 10.3.9?
Matrix
2005.08.27, 12:00 PM
Adding proper shadows to everything, though, might be.
Stencil shadows are already supported on the animated models (players, items, weapons, etc)...
type this into the console:
\set r_stencilbits 8
\vid_restart
\set cg_shadows 2
OneSadCookie
2005.08.27, 07:11 PM
they're not "real" stencil shadows though, in that they simply darken what they hit by a certain amount rather than actually occluding light. They also suffer from nasty artifacts like falling through geometry.
they were cool when Quake III was released, but they're not really going to cut the mustard for a new game.
FreakSoftware
2005.08.27, 07:51 PM
Keith should just plug his brain into the internet under the BSD license.
FreakSoftware
2005.09.05, 06:31 PM
I figured out the whole half-model/missing entity stuff... well, part of it. If you run it in Development mode, it's all nasty. If you run it in Deployment it's all beautiful and spectacular. I've gotten q3asm and all that working too, but it only works with the original code that was released by id long ago. The code is identical though (I'm pretty sure) so I'm sure there's something else missing. But I have successfully been able to modify the game code, compile it as a bundle (not using q3lcc and q3asm) and run the game using it. It freaks out if I do the same with the ui bundle, but it works for game and cgame. Weird.
After un-limiting the frame rate, I get about 265-285 on average in q3dm1 outside in the courtyard, down to about 110 if i shoot a bunch of rockets (like 5 are zooming around thanks to me slowing their speed down to 200 units/sec) and up to 400 max if i'm staring at wall or the sky. This is on a Dual 2 Ghz G5 with a 9800 SE and 3 GB of RAM. iTunes is running the background but that uses next to nothing. Oh, and sound is all the way down in Q3 if that makes a difference (I'd think it does)
JustDoug
2005.09.09, 07:53 AM
Some notes on compiling the bugger, or at least my experiences. YMMV.
It doesn't seem to like gcc 4.0.x or Xcode 2.0. It would compile, but bloated even under the deployment compile. The G4 version exhibited the 'Running Legs' bug in both development and deployment. Both would spit out a stream overflow errors in the console, and tended to be a tad stuttery. Oddly enough (or perhaps not), the development compile tended to run cleaner.
Slipping back into Xcode 1.2 and gxx 3.3 under 10.2 (nice to have old machines around, as gcc 3.3 segfaulted on the 10.4 machine) produced versions essentially identical to the point release, both in filesize and performance. The G4/altivec version was grand, in fact.
I'm assuming that some of the compiler changes introduced between the 3.3-4.0.x versions of gcc, particularly in the code optimization, made Mr. Game Sofware unhappy- or it could just be that the 10.4 and Xcode 2.0 environments get confused when dealing with Id Software.
FreakSoftware
2005.09.09, 09:15 AM
It doesn't seem to like gcc 4.0.x or Xcode 2.0.
I'm using gcc 4 and Xcode 2.1 and it works just fine.
It would compile, but bloated even under the deployment compile. The G4 version exhibited the 'Running Legs' bug in both development and deployment. Both would spit out a stream overflow errors in the console, and tended to be a tad stuttery. Oddly enough (or perhaps not), the development compile tended to run cleaner.
The only thing I've noticed is that if you run under Development, half of the models will disappear, entities won't be visible, and it'll say you're out of ammo when you can nstill shoot your weapon. Deployment works perfectly.
So far that's the only problem I have with the entire thing. I've gotten it loading code from a bundle built with gcc or a mod using qvm files packaged up in a pk3. It's a long processess but it's all working.
JustDoug
2005.09.10, 09:07 AM
Well! Updated/upgraded to Xcode 2.1, skipped Development altogether and compiled Deployment build directly, and... Bingo! I guess something in 2.0 got confused, or I'd played with something I shouldn't have in the past.
No bonus though, as the gagame.bundle errored to death (ID_INLINE seems to be a popular culprit). Builds for the application(s) seemed to produce more warnings than I'm comfortable with, but they were non-critical and generally of the normally harmless variety.
It still bloated and I wound up having to manually strip the executable even after turing off (or so I thought) the debug info generation, but that led to that svelte, lean-and-mean, well-running application we've known and come to love. A cursory check showed a miniscule performance improvement over the original as well. Good Stuff, IMHO.
Now, to start digging around in it!
FreakSoftware
2005.09.10, 01:33 PM
No bonus though, as the gagame.bundle errored to death (ID_INLINE seems to be a popular culprit). Builds for the application(s) seemed to produce more warnings than I'm comfortable with, but they were non-critical and generally of the normally harmless variety.
Ahhh... yes. I added a prefix header to the project and defined MACOS_X which cures the problem. I guess you could just change all occurrences of MACOS_X to something that's actually defined...
Sixten
2005.09.15, 04:26 PM
In the interests of trying to encourage Mac compatibility to stay strong in the derivative projects that I'm sure will crop up based on the Q3 code, I'd encourage you guys to contribute any changes you've made to the base source in getting it working to the "bootstrapping" repositories. Like the one at icculus (http://icculus.org/news/news.php?id=2483).
WhatMeWorry
2005.09.20, 01:40 AM
I'm surprised to hear the code is C. I'd of imagined it would be C++. In fact, wouldn't
it be true to say nowdays that all top self games are C++?
Skorche
2005.09.20, 02:10 AM
I guess I don't find it that surprising. The first Halo was written in C.
C++ certainly makes some things easier but generally C is the way to go if you want ultimate portability.
OneSadCookie
2005.09.20, 02:36 AM
Carmack "reluctantly" switched to C++ for Doom III.
Personally, I'd rather choose an actually high-level language for the main game code, and write performance-critical stuff in C, rather than touch C++.
FreakSoftware
2005.09.20, 01:07 PM
Nowadays it's (nearly) all C++, but in Quake, Quake II, and Quake III which was released in 1999 were all in C. C++ wasn't a big hooplah, and the C code base did just fine in Q3 and shares many similarities with Q2, so it made a lot of sense.
PatrickB
2005.11.06, 02:05 PM
I couldn't tell whether or not you all knew of this forum's existence:
http://www.redsaurus.net/gtkradiant/viewtopic.php?t=381
Also, n00b question: does the q3 source require xcode to compile, or can I still use Project Builder?
FreakSoftware
2005.11.09, 01:42 PM
The code doesn't require any specific compiler to compile it but you'd be better of using Xcode.
I'm not following that forum carefully but I do look at it every once in a while. I'm also on the icculus mailing list and am listening to what they're doing.
JustDoug
2005.11.10, 01:02 AM
I couldn't tell whether or not you all knew of this forum's existence:
http://www.redsaurus.net/gtkradiant/viewtopic.php?t=381
Also, n00b question: does the q3 source require xcode to compile, or can I still use Project Builder?
Works great (see other tips and hints about proper settings). However, if you're one of those old-fashioned make purists, you can even use the *nix makefiles to compile it if you want (with a little tweaking, like using -falign... instead of -malign... and setting the -Ddefines properly). I even managed to use the included cons consructors after diddling the settings, mostly to get around nasm, to make it happy. About the only real gotcha is that it does -not- like gcc 4.x, probably due to optimization routines and the code not liking each other.
Oh, and anyone had any luck getting bspc to behave? I can get it to compile and run (after feeding it some code to satisfy the LittleShort etc. function defines), but the resulting aas files are not at all pretty. The common code seems to be quite happy with OS X/ppc, but the bspc code looks to have a lot of alignement, size and endian issues. Lots of huge negative numbers reported, double "regular" file size and it makes the engine go boom.
- Doug
FreakSoftware
2005.11.10, 01:34 AM
I haven't run bspc. Just q3asm & the others.
maaaaark
2005.11.13, 04:50 PM
The guy who built it is called zaphod, there is a config file called zaphod.cfg in the pak0.pk3 files!!
Ive had more success with a unix version of the mod sdk that was release ages ago than this for building custom qagames and cgames and stuff, does anyone know why they are in .bundles?
yes it never occurred to me why they put their cfg files into the pk3 files, until quakecon, were the id members would just do "exec myname.cfg" or whatever the command was (i haven't played quake in ages). har har.
UnifiedMac
2005.11.19, 10:51 PM
I've build the source in deployment and I've got a PC version of Q3, but is it possible to play the game from this?
If I select the installation directory, the id logo is shown, the screen fades and then all I have is a white screen. Then nothing else seems to happen after this.
OneSadCookie
2005.11.19, 11:12 PM
Make sure you have all the .pk3 files for 1.32, but yeah, it should work.
FreakSoftware
2005.11.19, 11:21 PM
Yes, you can run the game from the code and the data files (from anywhere you get them). How you package it up and run it on a PC is possibly different than on a Mac. If the other messages here don't help, I'd suggest running the code in the debugger, stopping on the first line of code and walking through until you figure out where you're supposed to have put stuff.
JustDoug
2005.11.20, 09:09 AM
I've build the source in deployment and I've got a PC version of Q3, but is it possible to play the game from this?
If I select the installation directory, the id logo is shown, the screen fades and then all I have is a white screen. Then nothing else seems to happen after this.
In excruciating detail, just in case:
Compile to taste. Place in a convenient directory. Create a 'baseq3' directory in the same directory. Copy the PC version's pak0.pk3 file to the baseq3 directory. Download the 1.32 point release. Copy/move/unarchive the pak files from the point release into the baseq3 directory. Happy fragging.
The 'missionpack' folder is for Q3: Team Arena, and does NOT go into the baseq3 directory, but into the same directory as the game application (you'll need the Q3:TA pak0 in with the rest to play that- though you can convince your Quake3 to run/use the demo available online with a tiny bit of editing to the source (no, I'm not going to go into that much excuciating detail).
- Doug
joe07734
2005.12.26, 10:29 PM
I just went through the ordeal of downloading the Quake 3 sources and getting it all building and running on OS X 10.4 with Xcode 2.1, including being able to modify and test the qagame server code as a bundle (you don't even need to quit the app, just restart the arena for the changes to take effect). It was difficult pulling all of the relevant bits of wisdom together from all over the net, so I wrote up a wiki page how-to. I hope others find it useful.
http://wiki.bennington.edu/wiki/bin/view/ComputerScience/Quake3
/joe
vBulletin® v3.6.8, Copyright ©2000-2008, Jelsoft Enterprises Ltd.