Board index DeFRaG How to DeFRaG

velocity snapping

Users helping users.

velocity snapping

Postby bunny » Apr 5th, '11, 7:12 pm

what is this?
how do i deal with it?
is there any hud items did might come in handy?

mb somone else wants to take this challenge and tells us sumthing about it
unfortunately i never read cgaz comments on it, but i think, from what i have seen, we need a pretty huge tutorial about this
a short info text,to explain the basics by sumone who nos about q3 physics would be nice tho
real Crysis Warhead.
penis.
bunny
 
Posts: 95
Joined: Dec 13th, '10, 1:52 am

Re: velocity snapping

Postby <hk> » Apr 5th, '11, 7:21 pm

Setup wrote an article about it.
Grr, why must all this happen, when I have no time to investigate? :evil:
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Re: velocity snapping

Postby bunny » Apr 5th, '11, 7:22 pm

cuz u should have done it years ago :p
real Crysis Warhead.
penis.
bunny
 
Posts: 95
Joined: Dec 13th, '10, 1:52 am

Re: velocity snapping

Postby TittenIgnition » Apr 6th, '11, 12:31 am

if anyone is gonna write anything about this, it should be someone with better english than you >_>
wtf i have a signature?
User avatar
TittenIgnition
 
Posts: 455
Joined: Jun 4th, '10, 1:24 am
Location: QuakeNet

Re: velocity snapping

Postby gund3r » Apr 6th, '11, 2:22 am

KittenIgnition wrote:if anyone is gonna write anything, it should be someone with better english than you >_>
gund3r
 
Posts: 23
Joined: May 6th, '10, 4:24 pm

Re: velocity snapping

Postby bunny » Apr 6th, '11, 2:35 pm

KittenIgnition wrote:if anyone is gonna write anything about this, it should be someone with better english than you >_>


1. that's a pretty bad english there
2. it doesn't make any sense
3. feel free to go for it

if you don't have anything to say to velocity snapping (what else would we expect by someone who doesn't even get what a freakin' ob is?) then i guess there's no reason for you to post here

no more offtopic bsing, please..
real Crysis Warhead.
penis.
bunny
 
Posts: 95
Joined: Dec 13th, '10, 1:52 am

Re: velocity snapping

Postby TittenIgnition » Apr 6th, '11, 4:10 pm

standart wrote:
KittenIgnition wrote:if anyone is gonna write anything about this, it should be someone with better english than you >_>


1. that's a pretty bad english there
2. it doesn't make any sense
3. feel free to go for it

if you don't have anything to say to velocity snapping (what else would we expect by someone who doesn't even get what a freakin' ob is?) then i guess there's no reason for you to post here

no more offtopic bsing, please..


1. my english is fine, i just dont care enough to actually have proper punctuation. you, on the other hand, write like a 2 year old.
2. it makes perfect sense.
3. why would i do that?

why would you assume i dont know what an ob is? is that the best insult you can think of?
wtf i have a signature?
User avatar
TittenIgnition
 
Posts: 455
Joined: Jun 4th, '10, 1:24 am
Location: QuakeNet

Re: velocity snapping

Postby bunny » Apr 6th, '11, 5:05 pm

now here's something to get you thinking (thx run):
http://q3a.ath.cx/download.php/fc.pk3


to kittenignition: mb i am, unlike u, not interested in insulting you
and yes, i find it a real damn shame that u keep spamming your off topic bs..take it sumwhere else, this is not the random section
and ty for helping us with the velocity snapping, i appreciate ur work..
e: btw, i find it a big shame that u don't know what an ob is
real Crysis Warhead.
penis.
bunny
 
Posts: 95
Joined: Dec 13th, '10, 1:52 am

Re: velocity snapping

Postby setup » Apr 24th, '11, 11:11 pm

In a nutshell... Term "velocity snapping" describes the feature of Q3 player movement code when components of the velocity are rounded to integers every player frame (8ms long in the standard physics). It's caused by this code:
Code: Select all
// snap some parts of playerstate to save network bandwidth
trap_SnapVector( pm->ps->velocity );

in the function PmoveSingle() (bg_pmove.c). You should notice that the rounding happens in the end of every frame after everything is calculated.

In the air the maximal increase in the velocity per frame is calculated as:
pm_airaccelerate * g_speed * (pmove_msec / 1000) = 1 * 320 * 0.008 = 2.56 UPS


The following picture shows what happens to this `2.56' value after snapping:
accel.png


Even though the idea behind the velocity snapping is very easy, it can be a problem to take advantage of it. One aspect of it that I like can be found in the famous cgaz_cos1_[605,7in1].dm_68 demo.
You do not have the required permissions to view the files attached to this post.
Luck is evil.
setup
 
Posts: 19
Joined: Jun 7th, '10, 10:41 pm

Re: velocity snapping

Postby <hk> » Apr 24th, '11, 11:55 pm

Seeking for the (code)origin of that bug was in the top5 of my list of things to do after I turn in my diploma thesis in May.
Why does everything suddenly get active and code related, when I have zero time to join in.
It's just not fair :cry: :cry: :cry:

At least my hunch was right. It was the bandwidth code. :think:



setup wrote:Even though the idea behind the velocity snapping is very easy, it can be a problem to take advantage of it.


To have the maximum speed gain you have to hit that speed spot where the green dot is the farthest from the origin(or red circle). In this case (1/3) or (-1/3)
That graph basically says that one should never strafe along the world axis but still close to it.

This bug/feature is also the reason a player looses speed when switching the direction at high speed strafing, I guess. I'd love to investigate, but no time :cry: :cry: :cry:

setup wrote:One aspect of it that I like can be found in the famous cgaz_cos1_[605,7in1].dm_68 demo.

Would you mind uploading it into the forum?
User avatar
<hk>
Menstruating 24/7
 
Posts: 1040
Joined: May 2nd, '09, 12:06 am
Location: Ingolstadt Germany

Next

cron