How is the time delay between walk packets being calculated?

03/14/2019 19:07 lemon250#1
Hello, did anyone figured out how delay between walk packets is calculated. My approximation is something like 920/4 * length of previous step, but it's not enough. Weird thing is that delay is varying even thought step length is not changing.
03/15/2019 12:40 GGGGame#2
_movetime = ServerManager.RandomNumber(400, 3200);
03/15/2019 17:12 FI0w#3
Quote:
Originally Posted by GGGGame View Post
_movetime = ServerManager.RandomNumber(400, 3200);
What a shiit
its the Time for OpenNos to Move the Monsters....
03/15/2019 18:35 Nortank#4
Funny, I was looking for this two days ago. I did a :
std::ceil(speed/4)
but I think that is not that. (Got some buggy movespeed)
03/16/2019 14:14 lemon250#5
After many tries i looked up at NosWings server source code, made a little change to monster movement delay equation and ended up with stepDelay = stepSize / (speed / 2.0f) * 1250. I don't have any idea if it's similar to what client does, but it works :D
03/18/2019 01:14 jinsun#6
Quote:
Originally Posted by FI0w View Post
What a shiit
its the Time for OpenNos to Move the Monsters....
Hi Flow I need talk You please add Discord Jes#8034
03/18/2019 03:51 0Lucifer0#7
Distance*2500/speed = timeofwalk
03/18/2019 12:55 Nortank#8
As an example :
My character got a movementspeed of 23.
(x;y) are my coordonate. If I go straight ahead, (x+8;y), (x-8;y), (x;y+8), (x;y-8) are all the possibilities. 8 is the traveled distance in a straight line.
If I am running diagonally, my possibilities are (x±6;y±6). What is my distance here ? 12 ? So the timing will be lower than before ?
=> Straight line : 8*2500/23 = 869
=> Diagonally : 12*2500/23 = 1300 ? I guess this is too large. Maybe 1300/2 = 650 ? Or sqrt(12)*2500/23 = 376. Guess that is too short.

Clientside, what is the way to get the distance ? (Currently I am using a fixe distance of 4)
03/18/2019 20:05 0Lucifer0#9
public static double Octile(int iDx, int iDy)
{
int min = Math.Min(iDx, iDy);
int max = Math.Max(iDx, iDy);
return min * SQRT_2 + max - min;
}
With iDx the diff in x and IDy the diff in y
Note: you can use any math distance formula