The online racing simulator
Time measurement in LFS
(5 posts, started )
#1 - Vain
Time measurement in LFS
Hello.

Since a while I know that my system's clock runs too fast. That usually isn't a problem, because I use this computer (nearly) solely for games, mostly LFS.
Out of fun I calculcated that, using my system's clock, my laptimes on a 2 minutes lap are about 0.4 seconds longer than measured with a correct clock.
Now I guess that in singleplayer mode and hotlapping this means that my laptimes will be too high until I buy a new motherboard. But my question is wether this also applies in multiplayer.
There are several questions that arise here:
Is my lap in LFS measured against my clock or the server's clock? Is the total time and thus place in the game measured using my clock or the server's clock?

Normally I would write this as a PM to the devs, but I put it here so the knowledge is available to others.

Vain
Uhm, I don't think that your PC clock has any direct influence on your games unless they are programmed to benefit from such an influence. Due to the 'unsafe' nature of having laptimes calculated and timed through an outside factor I sincerely doubt that LFS hotlapping is influenced by the system clock. I take it LFS simply has its own clock? after all, why would it be running based upon your system clock.
That would mean that the LFS clock would have to be changed for different countries. If it does have it's own clock then it is unbelievably sophisticated.
Firstly it is important not to confuse the clock displayed in windows with the timing on the motherboard. In many games hacking the timing on the motherboard is used as a cheat so I would imagine LFS protects against this.

LFS uses delta timing, this means that every movement is based upon the time differential to occur since the last "pass" of whatever calculation is occuring. By doing this LFS is able to run the same speed on a machine running at 20fps as a machine running 100fps. If LFS did not do this then it would run at a fixed framerate and all systems that did not achieve this framerate would have a dissadvantage.

The timer used to do this increments in milliseconds (1000 steps per second) and is a fixed rate on all systems, but there are existing hacks, used in other games, which allow you to move at double speed etc by
hacking the timer on the motherboard.

LFS time stamps every network packet it sends with the millisec counter, so any player doing this would appear to have lag as it's position is miscalculated between machines (one more reason not to tolerate lagging players!). It may also feature some protection against it, the data is there so perhaps LFS analyses it - although as i'm not a cheater, I have no idea.

If your lap times are reporting incorrectly it is probably this timer which is running at the wrong speed, I dont know about now but this always used to be done with a small quartz oscilliator, so it could be something as simple as a miscut piece of quartz, but whatever technology is used now I dont know - but in any case it's a case of throw away the motherboard or write a software speed hack that re-adjusts your system timer to compensate, although the technical aspects of how to do that elude me.

To more specifically answer Vain's concerns, lap times whilst online I believe I timed by the server, that is an educated guess based on insim data and what I know of the way LFS works. Hotlapping times would be calculated on your own machine, but may be validated when uploaded.

I have no idea how accurate LFS' lap time reports are, perhaps it is the same for all of us?
You know, I did so not read that post then.

Sum it up in a few lines.

Time measurement in LFS
(5 posts, started )
FGED GREDG RDFGDR GSFDG