![]() |
|
This thread is locked; no one can reply to it.
![]() ![]() |
1
2
|
Quake 3 Source Code |
Billybob
Member #3,136
January 2003
|
I hacked into their servers and got the source code, mwahahaha.
|
ReyBrujo
Moderator
January 2001
![]() |
I read in Digg I think that is not the full source code, but only the mods support source code, is it true? I never liked Quake, though, been a Counter Strike man myself. -- |
juvinious
Member #5,145
October 2004
![]() |
Carmack announced that the code will be published under the gpl very soon. He was actually going to do it last year, but ended up holding on it since ID, at the time, had just licensed it to another company. [edit] __________________________________________ |
Billybob
Member #3,136
January 2003
|
It's the full Quake 3 Arena source code. You can compile it on Windows, Linux, and even Mac OS X. Though I hear it's buggy on OS X.
|
juvinious
Member #5,145
October 2004
![]() |
Billybob
Member #3,136
January 2003
|
For those that don't like reading all those /. comments (and since Alterslash doesn't archive good ones): Quote:
Results of `grep -ri fuck *:
Quote:
Tested on a Debian Sarge:
wget ftp://ftp.idsoftware.com/idstuff/source/quake3-1.3 2b-source.zip
find -type f -exec dos2unix {} \;
cd code ./unix/cons
cd install
cp -a usr/local/games/quake3/baseq3* ~/.q3a/baseq3/
Quote: First off, a big thanks to John Carmack for opening doors for developers again. The most exciting thing about this release is the GPLd 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.
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; } /// Note on the above code. It's under the GPL now, so be sure to follow the GPL when you implement that.
|
Brolin Empey
Member #6,132
August 2005
|
I found this in unix_main.c and macosx_sys.m: int Sys_MonkeyShouldBeSpanked( void ) { return 0; } My grepping shows that this function is never actually called anywhere. |
Evert
Member #794
November 2000
![]() |
I just hope InvSqrt doesn't do what its name suggests it does (invert a square root)... |
Dennis
Member #1,090
July 2003
![]() |
...would not "inverting" a squareroot be the same as "abs"... maybe it gives the "reciprocal" so its 1/sqrt...but still "inv" is wrong...mumble mumble... --- 0xDB | @dennisbusch_de --- |
Kitty Cat
Member #2,815
October 2002
![]() |
Somebody should run it, and compare the input and output. -- |
Rick
Member #3,572
June 2003
![]() |
Quote: It's the full Quake 3 Arena source code. It has an actual int main() (read OS specific main function)? Cool...Sorry, I've worked on HL code before. I hate not seeing int main(). It just makes me fuzzy inside to see the starting point. ======================================================== |
Peter Wang
Member #23
April 2000
|
Dennis, you peeked at the answer didn't you?
|
Dennis
Member #1,090
July 2003
![]() |
Peter??? I can't follow you: What answer? Answer to what? What did i say? Did i answer anything? (really i have no idea what you're talking about) --- 0xDB | @dennisbusch_de --- |
Peter Wang
Member #23
April 2000
|
The mystery of InvSqrt().
|
Avenger
Member #4,550
April 2004
|
More importantly, why is it there?8-)
|
Dennis
Member #1,090
July 2003
![]() |
I don't know what it does, was just guessing. Looking at the function itself however, it is considered very bad programming style by me, because --- 0xDB | @dennisbusch_de --- |
BAF
Member #2,981
December 2002
![]() |
This is so old news We've had the src code with a download mirror posted in #Allegro's topic since yesterday |
Evert
Member #794
November 2000
![]() |
Well, you guessed correctly (of course). Interestingly enough, I ran the following programme through the profiler:
Compiled with -O2 -pg on gcc 3.4.1 and running on an AMD 64 in native mode. % cumulative self self total time seconds seconds calls ns/call ns/call name 52.52 1.53 1.53 10000001 153.37 153.37 InvSqrt 31.79 2.46 0.93 main 13.48 2.86 0.39 10000001 39.35 39.35 InvSqrt2 3.11 2.95 0.09 frame_dummy
So it actually seems to be both less accurate and slower than using the libc function! |
Mika Halttunen
Member #760
November 2000
![]() |
On this old and slow K6-2, 400MHz I got following results with Evert's code: (Compiled with -O2 -pg on MinGW 3.3.1) % cumulative self self total time seconds seconds calls ns/call ns/call name 46.38 2.37 2.37 10000001 237.00 237.00 InvSqrt2 32.09 4.01 1.64 main 21.53 5.11 1.10 10000001 110.00 110.00 InvSqrt
It seems that on old machines like this the hacky version is faster. |
Thomas Fjellstrom
Member #476
June 2000
![]() |
Heres the results on my machine: (AMD Athlon XP 2400+ @ 2ghz w/768MB PC2700 ddr sdram) also, using gcc 3.4.4 moose@S0106000ea679c3f1 ~ $ gcc -pg -c invsqrt.c -O3 -march=athlon-xp -fno-fast-math moose@S0106000ea679c3f1 ~ $ gcc -pg invsqrt.o -o invsqrt -lm moose@S0106000ea679c3f1 ~ $ gprof ./invsqrt Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ns/call ns/call name 63.79 2.96 2.96 10000001 296.00 296.00 InvSqrt2 19.61 3.87 0.91 main 14.66 4.55 0.68 InvSqrt 1.94 4.64 0.09 10000001 9.00 9.00 frame_dummy edit: heres the -02 version moose@S0106000ea679c3f1 ~ $ gcc -pg -c invsqrt.c -O2 moose@S0106000ea679c3f1 ~ $ gcc -pg invsqrt.o -o invsqrt -lm moose@S0106000ea679c3f1 ~ $ gprof ./invsqrt Flat profile: Each sample counts as 0.01 seconds. % cumulative self self total time seconds seconds calls ns/call ns/call name 63.79 2.96 2.96 10000001 296.00 296.00 InvSqrt2 19.61 3.87 0.91 main 14.66 4.55 0.68 InvSqrt 1.94 4.64 0.09 10000001 9.00 9.00 frame_dummy
seems similar -- |
HoHo
Member #4,534
April 2004
![]() |
Just imagine what would be the speed difference if SSE sqrt function would be used. Sure, the accuaricy wouldn't be as good but I bet it would be quite a bit faster than libc sqrt. __________ |
Carrus85
Member #2,633
August 2002
![]() |
Too bad they don't include a sane makefile for mingw32 (aka. Us poor windows users who can't afford MS's "Expensorama" Compiler)... EDIT: I wonder, does this mean that with a bit of hacking we could soon get native versions of most Quake3 games on linux? (Like WolfET for example. Yes, I know it is native, but you can't really compile it to make your own platform-specific optimizations...) True, it would require the GPL-ing of the source for those other Quake3 based games, so I'm guessing no...
|
Niunio
Member #1,975
March 2002
![]() |
But is it the Quake 3's sources or not? ----------------- |
HoHo
Member #4,534
April 2004
![]() |
it is. Full sources of engine and some tools like radiant and some more [edit] __________ |
Niunio
Member #1,975
March 2002
![]() |
I meant, if I have all Quake 3 data files and I compile this sources, can I play Quake 3 Arena? ----------------- |
|
1
2
|