Movement angle measure?

Started by Grrr
02/04/2010 19:07
Page 1 of 2
Grrr02/04/2010 19:07

Hi, I wanted to ask amxx scripters is it possible to do a plugin which displays the 3d(movement) angle of the player? For example it will show the different angle in different frame (prestrafe,strafes) like the displaying speed plugin, or just add this information to ljstats.
P.S. I'm not talking about the looking vector only, the real/3d/player's angle depents on the pressed keys and the looking vector.
I wanted to know what must be the angles for a perfect lj and this plugin could be also useful for the lj-ers.

eDark13/04/2010 16:03(edited 13/04/2010 17:31)

why do you need it in 3d? wouldn t 2d be enough?
and about that: You can use the velocity values to get the movement vector.

kielorz13/04/2010 18:56

angles for perfect lj == perfect angles, they exist, they can be calculated by formulas i gave you some time ago.. and it's imp to teach your hand jumping with such yawspeed...

next - you mean view angle??

about the plugin - ofc its possible

Grrr13/04/2010 21:24(edited 13/04/2010 21:32)

eDark: yeah, 2d angles is more correct (the collision box position changing), but I think that the velocity isn't enough since I don't know on what angle do I turn on each strafe

I RUSSIA!: u'r right but its hard for me to calculate that, maybe if some1 make a plugin it would be easier with it, ofc it won't help about the "hand jumping" but it would be easier to find the player's mistakes with it, and I ment the collision box's position change, it always have different angles..

maybe it looks more clearly on the pic: http://img710.imageshack.us/img710/6310/2dangle.png , I'm searching for that golden angle and his calculation :P

EDIT: ofc it depents on the current velocity and the looking vector and the FPS (I'm sure u know that)

eDark13/04/2010 23:07(edited 14/04/2010 00:17)

as you can see here http://en.wikipedia.org/wiki/Acceleration the velocity vector is always pointing in the same direction as the movement vector so you can get the movement vector angle very easy by getting the velocity vector angle.

about the perfect angle ...
it s very difficult to say what the perfect angle is also the movement vector is not changing its direction instantly when you change the strafe direction, it s continuously changing like this: http://img512.imageshack.us/img512/1000/mvvec.jpg. But the movement angle over time is looking exactly like the movement vector in your picture: http://img191.imageshack.us/img191/3909/mvangle.jpg

kielorz14/04/2010 10:05

i think i gave you pictures made by ltrat and thread..

to calculate perfect angle for one frame there should be about 5-6 parameters and it can be only calculated iterationally cuz formula is very big(i also gave you extracts from hlsdk)

Grrr15/04/2010 11:24

hm, I understand now, its more complicated than I though, since its actually an arc not a angle, so this should be more correct http://img256.imageshack.us/i/curve.png/ ? (but the elipses should go smaller and smaller to the end)
sry I RUSSIA!, I didn't understood anything from that pic, and I already knew those stuff in lt.Rat's thread and I don't know c++, so these hldsk extras didn't helped me much :/

KooleN15/04/2010 11:58

I exactly thought the same thing about this plugin if its possible ;)

kielorz15/04/2010 12:06

possibly i will make some program to calculate as precise as it can be perfect x angle

and, Grrr, your pics are misunderstadable, and they mean that jump consist of 5-6 frames xD

Grrr15/04/2010 12:47

Originally posted by I RUSSIA!
and, Grrr, your pics are misunderstadable, and they mean that jump consist of 5-6 frames xD


sorry, I can't do graphs :D imagine that its just a part of the full strafing :P

eDark15/04/2010 15:32(edited 15/04/2010 15:34)

it s not elliptical it s quadratic and the image i posted is from an actual jump but as you can see on the axis it s not so wide in reality.

Lt.RAT15/04/2010 21:26

Long time ago, i did plugin for myself, which show detail information about my strafes (currently only air strafes)
http://www.sendspace.com/file/j4g15d
(Sorry, but without source files. Some one could easily took them and did perfect strafe cheat :( without it he should do much work )

Log of jump only in console (coz too much info)
Strafe#1 NoButtons: 2 NoGain: 2 LooseSpeed: 0 StrafeButtons: D
Strafe#1 MoveVerySlow: 1 MoveSlow: 13 MoveLilSlow: 1 MoveIdeal: 5 MoveLilFast: 0 MoveFast: 0 MoveVeryFast: 0
Strafe#2 NoButtons: 5 NoGain: 5 LooseSpeed: 1 StrafeButtons: A
Strafe#2 MoveVerySlow: 0 MoveSlow: 5 MoveLilSlow: 0 MoveIdeal: 2 MoveLilFast: 0 MoveFast: 0 MoveVeryFast: 1
Strafe#3 NoButtons: 4 NoGain: 4 LooseSpeed: 0 StrafeButtons: D
Strafe#3 MoveVerySlow: 1 MoveSlow: 1 MoveLilSlow: 0 MoveIdeal: 0 MoveLilFast: 0 MoveFast: 0 MoveVeryFast: 1
Strafe#4 NoButtons: 6 NoGain: 11 LooseSpeed: 0 StrafeButtons: A
Strafe#4 MoveVerySlow: 2 MoveSlow: 2 MoveLilSlow: 1 MoveIdeal: 1 MoveLilFast: 0 MoveFast: 0 MoveVeryFast: 0
Strafe#5 NoButtons: 0 NoGain: 0 LooseSpeed: 0 StrafeButtons: D
Strafe#5 MoveVerySlow: 6 MoveSlow: 6 MoveLilSlow: 1 MoveIdeal: 0 MoveLilFast: 0 MoveFast: 0 MoveVeryFast: 0
Advanced Sync 40.45 57.89
TOTAL NoButtons: 17 DoubleButtons: 0 NoGain: 22 LooseSpeed: 1
TOTAL MoveVerySlow: 10 MoveSlow: 27 MoveLilSlow: 3 MoveIdeal: 8 MoveLilFast: 0 MoveVeryFast: 2

CJ Distance: 253.811401 MaxSpeed: 327.857818 (46.404) PreStrafe: (273.131) 281.453796 Strafes: 5 Sync: 74
  1 23.297 0.000 30.4 100
  2 8.191 0.448 19.2  57
  3 2.523 0.000 9.7 100
  4 5.535 0.000 24.0  35
  5 6.856 0.000 16.4 100

There two lines for each strafe, one with keyboard and some other info, second with mouse movement info. All information in number of frames (for lj with duck ~73)

Explanation
TOTAL NoButtons: 17 - # of frames without button movement at all (you can gain speed here)
DoubleButtons: 0 # of frames where u have WD/WA or SD/SA (you can gain speed, but you need other mouse movement style)
NoGain: 22 # of frames where no gain at all ) this can be caused if u move mouse in wrong direction, or DoubleButtons etc
LooseSpeed: 1 - # of frames where u loose speed
TOTAL MoveVerySlow: 10 - u move mouse too slow u should move it at least x2 faster
MoveSlow: 27 - still slow
MoveLilSlow: 3 - 15% from ideal
MoveIdeal: 8 - good, very good )
MoveLilFast: 0 etc - same as prev but if u move mouse fast... (15%+ faster than ideal)

Don`t look at Advanced Sync 40.45 57.89, its more experimental than useful. First value calculated with keyboard faults, second without, 100% here means maximum possible maxSpeed.

Known bugs, if u jump somewhere in corner all frames would be in MoveIdeal...

Plugin still in development: my TODO:
1) parameter for AD WS keyboard keys (currently it calculated in NoGain) but NoGain without mouse movement and with AD keys - different things
2) same thing for CJ ducks
3) parameter for counting number of frames in duck
4) fix known bugs

PS currently havent time for it, also need to write smth like article, because without it its hard to understand such info (as i think) :(

But maybe you need smth different from it :D For such requests better to do smth like loggers of player information, than u can analyze it in Excel or other programs...

Punk^15/04/2010 22:34(edited 15/04/2010 22:35)

^ shit. (As in "shit, I don't understand a thing")

Grrr16/04/2010 10:00

eDark: yeah I noticed that, it looks weird on graph, its like u do very big strafes

Lt.RAT: Thats a very nice plugin u got there and this brings me to my other question: Is it possible to get 100% gainspeed frames in 1 jump?

note: even if NoGain is 0, LooseSpeed is 0, NoButtons is 0, DoubleButtons is 0 and u got perfect Movelilslow in allmost all frames, that still isn't enough for perfect lj, since the lj trajectory must be perfect(ex: I made 2 scripts, with the same number of strafes, same prestrafe, but I improved 1 and it gets like 10 more maxspeed, but they do the same distance, why? its because my strafing trajectory is wider on the better-gaining maxspeed script than the other 1, so thats how I got the same distance, which means that stats are not all).. Thats why I made this thread.
But still I don't say that this plugin isnt useful, since that information is one of the 2 important things of the longjump.
Also I did 2 lj scripts with different looking vectors (on the strafes) and I don't know do they got different movement vectors, and is there any other type of strafing, and which one is the best :P gj for doin' that plugin

kielorz16/04/2010 11:25

> Is it possible to get 100% gainspeed frames in 1 jump?
Why not? But that trajectory will be fcking and distance will be not so big as you can expect...

p.s. one person did 75% advanced sync(% of maximal possible speed gain) by hands, but had only ~255 dist, and script does 263 dist and 65% sync. Make a conclusion from all this and make maximum possible lj script! GL in advance.

Lt.RAT16/04/2010 12:57

> Is it possible to get 100% gainspeed frames in 1 jump?
Yes its possible (in all frames gain speed), even with several strafes.
But yeah that plugin works only with speed, and for "linearity" of the jump we need other kind of plugins.

Also ~perfect mouse movement when u have all frames in MoveIdeal and not Movelilslow =)

Currently i havent plugins for linearity measurement :(

The best solution would be logger of player Origin (maybe + angles and +velocity) and analyze it in some other programs (like in eDark`s screen)

Grrr16/04/2010 19:39

Originally posted by Lt.RAT
> Is it possible to get 100% gainspeed frames in 1 jump?
Yes its possible (in all frames gain speed), even with several strafes.
But yeah that plugin works only with speed, and for "linearity" of the jump we need other kind of plugins.

Also ~perfect mouse movement when u have all frames in MoveIdeal and not Movelilslow =)

Currently i havent plugins for linearity measurement :(

The best solution would be logger of player Origin (maybe + angles and +velocity) and analyze it in some other programs (like in eDark`s screen)


yeah, I asked that cuz I thought that u gain speed only in the 1st vector and other just avoids antispeed, without gaining speed, but still thats in the 1st type of strafing, maybe its not the same in 2nd :P

yeah sry I ment MoveIdeal, but u understood me ^^, btw how close is that to the best? 5% , 4% , 3% ?

I don't know whats the amxx limits, but I asked for such plugin with linearity measurement, cuz I don't know does such program exist which is not private and also u got good solution right there. But the bad thing is that we got only 1 coder right here :/

btw I just tested u'r plugin and it works pretty good, so it will be useful for me, thanks :)

Lt.RAT16/04/2010 20:14

>>how close is that to the best?
In MoveIdeal 2.5% from each side (slow and fast), so totally 5%

Can you provide method of linearity measurement =)

I can code for you Origin (etc) logger, but then u can plot graphics like http://img512.imageshack.us/img512/1000/mvvec.jpg , idk it will help you or not =)

Grrr17/04/2010 18:04(edited 17/04/2010 18:05)

Originally posted by Lt.RAT
>>how close is that to the best?
In MoveIdeal 2.5% from each side (slow and fast), so totally 5%

Can you provide method of linearity measurement =)

I can code for you Origin (etc) logger, but then u can plot graphics like http://img512.imageshack.us/img512/1000/mvvec.jpg , idk it will help you or not =)


ofc, it will help me, I hope it won't be a big problem for u to code it =) thanks for helping,
btw MoveXXX depents on the current velocity, right? :P and
#2 NB: 0 NG: 0 VS: 0 S: 0 LS: 0 I: 1 LF: 1 F: 0 VF: 0 LS: 0 SB: D

-> I: 1 and LF: 1 means that this strafe contains 2 frames right ?
I like this plugin very much! :D

Lt.RAT21/04/2010 09:35

MoveXXX mostly depend on current frame Angle, Velocity and frameTime. (+ weapon speed, sv_xxxaccelerate, friction, movementKeys state, movementKeys speed (depends on cl_sidespeed etc); for prestrafe + sv_friction, edgefriction, stopspeed etc etc etc)
And it`s only params i`ve remember...

>> yes only 2 frames
Plugin http://www.sendspace.com/file/2cxsfn
It prints information in console; added compatibility with Excel; currently reduced precision, coz possible buffer overflow errors (this shouldn`t happen, but if, try -zone 2048 )

To toggle logging:
Commands: +log;-log;log_toggle;say /log_toggle
or
Cvar: jump_log 0/1 (default 0)

To enable Log in prestrafe: cvar jump_log_pre 0/1 (default 0) (log only frames with speed > 0)
To enable Log in jump: cvar jump_log_jump 0/1 (default 0)

Log Line description:
J0 60.000 60.000 5.968 0.000 0.000 0.000 10

prefix: "P" means prestrafe frame, "J" - jump frame
then current framecount

then Origin vector (3 values)
then Velocity vector (3 values)
last param - current frametime (in msec, 10 = 0.01 sec = 100 fps)

Page 1 of 2

Please log in to post replies.