How do I know when a Jump is done?

01/16/2014 11:48 Y u k i#1
How do I calculate the time it takes for the jump animation from point a to point b?

I want to chain up some jumps for mobs, atm i jump while im already in the air or i jump and stand (too long) and jump again.

Is there a formular how long it takes?
01/16/2014 15:03 SteveRambo#2
Not really, it all depends on the jump animation.
It shouldn't be too hard to make up a decent "formula" with a little testing.
01/16/2014 19:34 Korvacs#3
There probably isn't a concrete set in stone calculation, but you could measure the time it takes to jump 1 tile, then 2, then 3 and determine a calculation from that, distance * 0.750 seconds or w/e
01/17/2014 00:42 Y u k i#4
Yeah, thats my current approach :3

I wish there was a better way tho.
01/17/2014 01:27 Spirited#5
All jumps take the same amount of time to execute, as far as I'm aware. Jumping one tile vs. jumping 16 tiles, I've found that the time it takes to jump those distances are the same. A bit weird, hopefully I'm mistaking, but it wouldn't be unlike TQ to do something like that.
01/17/2014 01:53 asdfghjklwertyuiopzxcvbnm#6
i think fang is right, with the same speed it doesn't matter how many tiles you are jumping but their is different speeds (ex. female warrior with shield , katana jump), someone posted an example at proof of concept thread mentioning how many ms it exactly takes and how to edit it from server side
but again the best thing to do would be trail and error for maybe 10 jumps normally vs with speed hack with adding a bit of factor of safety to bj or just the precise value to disconnect or maybe tele them one jump back
01/17/2014 02:42 Super Aids#7
Nah, if you jump 30 tiles vs 5 tiles. It will take longer. It doesn't take the same amount of time.

Also the jump is shorter moving upwards than downwards.
01/17/2014 02:55 asdfghjklwertyuiopzxcvbnm#8
Quote:
Originally Posted by Super Aids View Post
Nah, if you jump 30 tiles vs 5 tiles. It will take longer. It doesn't take the same amount of time.

Also the jump is shorter moving upwards than downwards.
i know what you mean but i think it's something like maybe 500 ms for jump animation and maybe 20 ms per tile which makes it almost the same within the normal jump range of 10-18

but nope im sure that it's the same upward or downward but you can jump longer upward than downward because of the client gui
01/17/2014 07:58 Super Aids#9
Quote:
Originally Posted by asdfghjklwertyuiopzxcvbnm View Post
i know what you mean but i think it's something like maybe 500 ms for jump animation and maybe 20 ms per tile which makes it almost the same within the normal jump range of 10-18

but nope im sure that it's the same upward or downward but you can jump longer upward than downward because of the client gui
Nope, the angle of the client's camera makes it a little bit shorter upwards, nothing really noticable. Not sure if it changes the speed of the jump tho.
01/17/2014 08:15 drakejoe67#10
Well, having a better formula means easier to track down speedhackers.
I'll do what I used before, also mentioned above. Make a code that gives me Time spent + distance jumped whenever I jump.

Code:
double Formula = ((double)MillisecondsSpent / (double)Distance);
Console.WriteLine(Formula.toString());
or dump to log. w/e

Spam spam spam jump ~

We'll see what we get out of the average from all kind of angles and jumps I can make. The more accurate the formula, the less window for speedhackers. Flag upon each time they go over the treshold.
01/17/2014 09:21 Korvacs#11
If your trying to track speedhackers you should be measuring the interval between jump packets being received rather than trying to calculate the accurate time it takes to jump, Yuki wants it for NPC movement.

Jumping does take longer, the further you jump. If you remove the disconnect when jumping more than a screens width then you can see this in action, we used to do it all the time, you can make yourself jump an entire maps width if your careful and it takes 30 - 40 seconds.
01/17/2014 22:19 asdfghjklwertyuiopzxcvbnm#12
Quote:
Originally Posted by Korvacs View Post
If your trying to track speedhackers you should be measuring the interval between jump packets being received rather than trying to calculate the accurate time it takes to jump, Yuki wants it for NPC movement.

Jumping does take longer, the further you jump. If you remove the disconnect when jumping more than a screens width then you can see this in action, we used to do it all the time, you can make yourself jump an entire maps width if your careful and it takes 30 - 40 seconds.
30 seconds per maybe 1000 tile, aka 30 ms per tile which isn't even noticeable with range of normal jump (18 tiles jump is still under 540 seconds) which won't make sense for maybe 2 tiles because a 2 tiles will be no way in hell 60 ms , so conclusion there is jumping animation time and tiles time isn't really that noticeable with sensible 18 tile ranges, right ?
01/17/2014 23:24 Korvacs#13
...right, do you have a point?
01/17/2014 23:40 SteveRambo#14
I'm pretty sure Yuki just wanted to not make the monsters on his server look retarded when they jump. If they jump too fast, it's gonna look like they're speedhacking/teleporting, if they jump too slow they're gonna look stupid.

And still, the answer remains the same: The only way to find out is to do some testing.
01/17/2014 23:47 Y u k i#15
Quote:
Originally Posted by SteveRambo View Post
I'm pretty sure Yuki just wanted to not make the monsters on his server look retarded when they jump. If they jump too fast, it's gonna look like they're speedhacking/teleporting, if they jump too slow they're gonna look stupid.

And still, the answer remains the same: The only way to find out is to do some testing.
Nah its way more complex than just that but I got my answers :)

Thanks everyone :3