Board index DeFRaG DeFRaG in general

questions about q3 physics

Are you really the best?

questions about q3 physics

Postby hugman » Oct 13th, '11, 3:17 pm

I could probably find the answer to all these questions by looking through the source code for Q3 / CPMA but I figure some people here might know the answers =)

Just wondering a couple of things:
How does ramp jumping work in Q3 / CPM? I mean what's the formula for which jump angle you get and how much extra speed (CPM). Same thing for double jumping :D

Also, what's is it that gives you more aircontrol in CPM physics? I know that +moveleft doesn't accelerate you in a direction if you have > 30 UPS velocity in that direction, but is the air acceleration super high for +moveleft/right?
User avatar
hugman
 
Posts: 49
Joined: Sep 4th, '10, 8:15 pm
Location: Swe

Re: questions about q3 physics

Postby TittenIgnition » Oct 13th, '11, 5:26 pm

Hard to explain for me, even though I sort-of know the answers.

The way rampjumping works is, it basically adds "positive z velocity" at the cost of x/y. There are ways to lose less speed, but also gain less height. You can hit the ramp at an angle instead of dead-on. I was actually wondering this yesterday, but I think that if you rampjump within 400ms (first half; basically a doublejump) of the first jump, you lose less speed and go substantially higher, because it adds the velocity from a regular doublejump to the rampjump. If you hit the ramp while falling, you'll lose a lot more speed and gain a lot less height. Hitting ramps earlier in the jump is generally what you want, unless you've got some weird route that requires a really low rampjump.

I'm pretty sure that's right, but I don't know if it's even an answer to your question.

Doublejumps just give you + a bunch of velocity. No matter what, you'll jump 91u (a normal doublejump with nothing else interfering; you can go a bunch higher under certain circumstances).

I don't know much about air control though. I can use it, but I can't explain it. That's how basic my understanding of it is. It's a beautiful thing, though. Climbing walls is fun :D

----

I expect someone who knows what they're talking about to come in here and destroy my post with their uber nerd-level knowledge.
wtf i have a signature?
User avatar
TittenIgnition
 
Posts: 455
Joined: Jun 4th, '10, 1:24 am
Location: QuakeNet

Re: questions about q3 physics

Postby hugman » Nov 5th, '11, 5:47 pm

Okay nobody knows exactly :D

Different question then.
What's the difference between turning with +moveright/left vs +forward in CPM?
User avatar
hugman
 
Posts: 49
Joined: Sep 4th, '10, 8:15 pm
Location: Swe

Re: questions about q3 physics

Postby Nt.run » Nov 5th, '11, 7:51 pm

What's the difference between turning with +moveright/left vs +forward in CPM?

+forward uses a function made specifically for turning velocity vector without accelerating, while +moveleft/right uses usual air accelerate function with different settings.
+moveleft doesn't accelerate you in a direction if you have > 30 UPS velocity in that direction, but is the air acceleration super high for +moveleft/right?

Yes, air acceleration is 70 instead of 1 and wishspeed is capped on 30 ups.

You can check it in CPM code: http://q3.atdan.net/pub/code/q3/cpm1_dev_docs.zip step2.txt, CPM_PM_Aircontrol

Also, +forward doesn't cancel air accelerating, so until reaching some velocity you can turn and accel at the same time.

Oh and doublejump just adds extra 100 ups to vertical speed if previous jump was less than 400 ms ago, it is described in step2.txt too.
Nt.run
 
Posts: 38
Joined: Oct 19th, '09, 2:25 pm

Re: questions about q3 physics

Postby hugman » Nov 5th, '11, 11:20 pm

Thanks a lot
Got some reading to do 8-)
User avatar
hugman
 
Posts: 49
Joined: Sep 4th, '10, 8:15 pm
Location: Swe


cron