Quake 3 source released - XCode project included

⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #46
Keith should just plug his brain into the internet under the BSD license.
Quote this message in a reply
⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #47
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)
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2005.09
Post: #48
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.
Quote this message in a reply
⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #49
JustDoug Wrote: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.



Quote: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.
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2005.09
Post: #50
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!
Quote this message in a reply
⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #51
Quote: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...
Quote this message in a reply
Sixten
Unregistered
 
Post: #52
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.
Quote this message in a reply
Member
Posts: 321
Joined: 2004.10
Post: #53
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++?
Quote this message in a reply
Sage
Posts: 1,482
Joined: 2002.09
Post: #54
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.
Quote this message in a reply
Luminary
Posts: 5,143
Joined: 2002.04
Post: #55
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++.
Quote this message in a reply
⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #56
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.
Quote this message in a reply
PatrickB
Unregistered
 
Post: #57
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?
Quote this message in a reply
⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #58
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.
Quote this message in a reply
Nibbie
Posts: 4
Joined: 2005.09
Post: #59
PatrickB Wrote: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
Quote this message in a reply
⌘-R in Chief
Posts: 1,265
Joined: 2002.05
Post: #60
I haven't run bspc. Just q3asm & the others.
Quote this message in a reply
Post Reply