Author Topic: Possible Theory of the Delay Formula?  (Read 5114 times)

0 Members and 1 Guest are viewing this topic.

Possible Theory of the Delay Formula?
« on: October 08, 2011, 12:05:55 am »
I heard madmax talk about a lag formula or something that got something to do with dividing 2 players ping for 1000 and something like it
then I wanted to Test it, but I didn't found a reason betwen these numbers or something, then I decided to Try to make my own formula

Obs 1: I'm not saying it's right it's just a theory and few crazy calculations

Obs 2:You need to make an Experience to apply on the Formula

(ok here we go)

The formula is a so crazy thing, that even I can't organize it properly, take a look, and don't make too hard questions

(Simplest Version of the Equation)
X-Y=0


Let's go by Steps


Step 1-Make the Experience

1-Get a medium car which you know the max. speed

(I choosen Sabre)

2-Get a friend with a Super Car

(Sonetto got a Infernus)

3-Go to a place where you can reach the medium car's Max Speed and keep it

(Julius Thruway)

4-Reach the medium car's max speed while the Supercar keeps near

(Sabre's Max speed is 96 MPH)

5-when reached the max speed, the Supercar will keep touched on your Tail consequently getting Front damage

6-When you see where the Supercar hits the Air, Take a Screen Shot

7-Watch the Screen shot and park the medium car and the Super car as you saw in the Screen shot to calculate the distance of the Delay

8-Go to the Medium car's rear bumper and type /save A

9-Go to the Super Car's Front bumper and type /save B

10-Go to GTA SA Userfiles and search for Saved positions in SAMP Directory

11-Calculate the "Y Position" diference betwen the point A and point B

12-You got the Lag Distance

(Mine was 37.0 meters)



Step 2-Collect the Ping of both players which tested

(My Ping: 279
Sonetto's: 273

Mine + Sonetto = 552 )


Step 3-Find the X of the Equation

This is the Hardest part
this is when you find the Delay time
but before, you need to know the front car's max speed
(Sabre = 96 MPH)
Transfer 96 MPH to KM/H was better for me,because it's the distance unit I got used to
Just solve "Max Speed in Miles . 1,6"

Sabre's max speed in KM/h is 153.6, then it Runs 1 153.600 Meters per Hour in Max Speed
but i want to know the time, then you have to figure out how long he takes to run 37 meters

the make   "153.600  /  60" to know how many meters it runs per minute
the result is 2560, 2560 meters per minute, and to know how many meters per second
solve "2560 / 60" and the result is:  "42,66666666666666666667" but truly, it's not in need ALL these numbers
only if you want get a 100% precise number, so let's use only 42.6

Nice, you found the distance that a sabre run in 1 Second, 42.6 Meters? kinda hard to bellieve, but let's take it all in theory

Now we get the max speed p/ second and the lag distance
then:    42.6 - 37.0  = 5.6

"5.6"     this is     "X"

Now what it got to do with delay? first, get both pings and put them all togheter
(in my case it was 552)
divide 552 for 100 and you'll find "Y"   
X=5.6
Y=5.5

X-Y=0

5.6 - 5.5 = 0.1

This 0.1 is for all unprecise calculations, sorry for that 0.1 but I guess if someone go deep on this "formula" calculations
we might reach to  X-Y=0


By having sure of this X-Y=0 we can calcute the Delay time of the Players
get the Lag Distance and see how long the car takes to run it on his max speed (current speed)
37.0  /  42.6
is "0,86854460093896713615023474178404"
This is the Lag time, then to hit my Sabre , Sonetto would have to hit where I would be "0,86854460093896713615023474178404"
let's resume it to 0.86 secs, then the Formula for Sonetto is 0.86 secs, variates a lot betwen Players depending on Ping
it's Complicated, but I want to make another experience of these to be sure of it...
« Last Edit: October 08, 2011, 12:17:44 am by RedHotChiliPepper »
Win Streak: 10, ops mistype, 1

Offline MadMax

  • Lazyass, still hanging around AX from time to time
  • Admin
  • Posts: 4,359
  • I'm the road warrior...
    • View Profile
  • In-game name: MadMax[MAF]
Re: Possible Theory of the Delay Formula?
« Reply #1 on: October 08, 2011, 12:19:58 am »
ye, and try do this during race, to calculate distance in few seconds, lol

PLEASE, IGNORE ALL MY SPELLING MISTAKES AND OTHER TYPOS True racing fans enjoy horsepower in ANY form

Re: Possible Theory of the Delay Formula?
« Reply #2 on: October 08, 2011, 12:45:30 am »
The Important is: It Works! (atleast worked in the situation I tested, I need to test variations)

and these calculations are easy for a machine, if a good Programmer find a way to fix the desync and find a way to use a formula do make it
the speed of calculation of a machine is very higher than the human brain's speed, I bet the correct formula could be 3x bigger than
mine and even like that a computer would solve it quickly
Win Streak: 10, ops mistype, 1

Offline [MAF]mourad

  • Admin
  • Posts: 1,588
  • Life is a joke, laugh at it.
    • View Profile
  • In-game name: [MAF]mourad
Re: Possible Theory of the Delay Formula?
« Reply #3 on: October 08, 2011, 10:13:32 am »
i didn't even bother reading all of this  :L

Offline [LSR]Jarol

Re: Possible Theory of the Delay Formula?
« Reply #4 on: October 08, 2011, 10:30:15 am »
i didn't even bother reading all of this  :L

Offline Scorpion.

Re: Possible Theory of the Delay Formula?
« Reply #5 on: October 08, 2011, 10:42:16 am »
blah , ppls didn't have nothing to do.

Offline [MAF]mooman

  • Leader
  • Posts: 6,299
    • View Profile
Re: Possible Theory of the Delay Formula?
« Reply #6 on: October 08, 2011, 03:55:58 pm »
(279+273)/1000 seconds * (95mph in m/s) / 5 metres

279 = first players ping
273 = second players ping
95mph = speed of car
5 metres = length of car

result is how many car lengths behind you are on that person's screen (and vice versa)

for me and max, my ping is 30 to 40 and max's is 80-100 and here is the results for us with sabre (which is 5 metres long and has a max speed of 95mph)

(90+35)/1000 seconds * (95mph in m/s) / 5 metres = 1.062

i took the screen below when max was pressing horn to indicate we were parallel on his screen. as you can see he is ~1 car behind me so it looks like the formula works :)


this is good for calculating where someone is in a straight line but try to do it in a corner.. you can't predict where someone will be there cos the information isn't available yet. so "fixing sync" is impossible unless you know some code that can predict the future
will read and answer your forum PMs when I'm less busy!

Offline [FSR]Ush

  • Admin
  • Posts: 13,449
  • Aart
    • View Profile
Re: Possible Theory of the Delay Formula?
« Reply #7 on: October 09, 2011, 10:01:35 am »
Nice maths mooman, me and Max also tried it.. my ping is slightly higher than yours. But the car was a bit faster. I think our result of the maths was 1,3.


Re: Possible Theory of the Delay Formula?
« Reply #8 on: October 27, 2011, 07:06:56 pm »
Lol Sabre has 5 meters?
Win Streak: 10, ops mistype, 1

Offline MadMax

  • Lazyass, still hanging around AX from time to time
  • Admin
  • Posts: 4,359
  • I'm the road warrior...
    • View Profile
  • In-game name: MadMax[MAF]
Re: Possible Theory of the Delay Formula?
« Reply #9 on: October 27, 2011, 07:12:14 pm »
bit more
~5.10 to ~5.20

PLEASE, IGNORE ALL MY SPELLING MISTAKES AND OTHER TYPOS True racing fans enjoy horsepower in ANY form