g_speed & g_gravity


(Bludd) #1

For Q3A & ET, g_speed is 320 and g_gravity is 800 (by default), so why is it that Q3A is faster and the jumps are higher? Do 320 and 800 represent different units in the two games? Or is it just an illusion, and there’s actually no difference at all? Or perhaps, in the case of g_speed, is it possible that 320 refers to walking speed, while in ET it refers to running speed? That still wouldn’t explain the gravity, though. Hrm, anybody know anything about this?


(Psycho Al) #2

Possibly these values are relative to internal values in the code. So they’d be kept the same as they’re expected to represent the normal state of play but are in fact modifiers on different numbers behind the magic.

Erm, that was a theory/question/suggestion. :slight_smile:


(Sick Boy) #3

Jumpspeed is fps-relative: different fps give different rounding errors resulting in more speed and higher jumps. But why is it different in RTCW as in Q3?

This is an explanation I found on http://ucguides.savagehelp.com/Quake3/FAQFPSJumps.html

(3) The integer conversion done by the Q3 vm IS NOT ANSI COMPLIENT. ANSI C specifies that integer conversion is done by ignoring the fraction. The Q3 vm does it by rounding to the nearest integer.

This third point explains exactly why DLL’s have slower speeds and jump heights than QVM’s. In a QVM, the rounding is to nearest integer, so errors will tend to cancel out. In a DLL, rounding is always towards 0, so errors always reduce your speed and will always accumulate. The rounding error in a DLL always acts as extra friction. I expect you can get around this problem in DLL’s by rewriting the “SnapVector” macro to emulate the QVM’s rounding method.

Q3 uses Q3 VM , RTCW and ET use DLL’s (can someone verify this I’m not too sure :slight_smile: )


(Bludd) #4

Hmmm, interesting, Sick Boy. I knew about the FPS/jumping stuff, but the VM vs DLLs is interesting stuff. Anyway, I’m kinda thinking more along the lines of what Psycho Al said, that is, a “unit” of speed and a unit of gravity must represent different things in the underlying code, because regardless of the FPS stuff, everyone knows that Q3A is faster and you can jump higher, yet these values are the same in both games. Strange…


(Rippin Kitten) #5

Its an internal value in the source. If you were really modivated, you could look in both the original q3 and the newly released et source and see where they defined this value.

RK


(SCDS_reyalP) #6
  • Gravity isn’t the only input of a jump :smiley:
  • the ET player is quite a bit bigger than the Q3 player, so equal speed or jump height will feel slower
  • et has walk/run/sprint q3 only has walk/run

The FPS and dll/qvm stuff is all minor.