• Blurring the line between real and virtual motorsports
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Kennett's think tank - Lag and sync issues

Discussion in 'Presto GP' started by Kennett Ylitalo, Sep 8, 2012.

  1. OP EDIT: was in another thread, involves lag related collision:

    I wont comment on the issue above but i've seen mostly Anthony, the rest are in my mirrors and the disappear in the distance. I've learned that i need to keep +5m distance to Anthony (+1m wheel to wheel or more), i know he knows it too and our battles have been fair and safe. But i believe it really took one major possibility of an race ending incident earlier where my heart jumped massively enough to remember that.

    And i haven't had so much experience driving with drivers from the pacific side of the globe, most i've done is some US guys and mediterranian, i'm surprised than we can even keep our brothers in the game, that is one huge accomplishment. I have done a lot of research thou on the collision detection and latency, it has something to do (insert sarcasm quotes there..) on the issue here. As i think i got some theoretical of how the prediction system works..

    The car keeps it's trajectory and current speed until the next frame arrives

    Simple. That's the current prediction system, efficient, simple and works only in racing games where trajectory changes relatively slowly.. In FPS games you can change direction very quickly, doing 720 jump q-scope headshot is a "skill" that some even revere. But they don't travel rather parallel to the ground, 300km/h per hour to one direction, the YAW rate is ridiculously slow, almost using only one axis from the 3D world, very close to being one dimensional in very small time-frames... So this prediction system is efficient, it's easily predictable in human terms too, cars keeps going the direction it is going negating any yaw change, like the car loses all grip and just keeps going straight until the next frame of information is completely transmitted to your display and other output devices....

    One could say that inside is safe, outside dangerous, since the trajectory points there but then again, sometime the data gets confused, you make a corrective move, and it just halts in the direction you inertia was taking you but the steering wheel and thus simulated slip angle hasn't taken effect yet and you get really good hit in the latency.. Mostly the chicanes have this. You may tap the inside guy... But then the energy of that collision is really small, the two vehicles trajectories are most likely almost parallel so the hit is much smaller. In the worst case scenario, it happens and it's not even that rare. Statistically outside should be more dangerous anyway.. (no statistic is available.. no ****)

    I hope they have taken more yaw rate in to calculation to the next gen simulation model, it's so easy to calculate...Now it's just a straight line. At some point the game decides it has taken too long since a good frame was receiver, and it switches off the collision from that model globally (from all machines, server side command), then receives new frame and updates data, get's another delay, etc.. then we get infmaous the skip. All this is works around ½->1s range.... Really bad skip takes about double of that and then ~5s skip would be considered as catastrophic, don't know if there's another layer beyond that and if there's additional layers before that... Not important, we are looking at functions under 1s... At some point it shuts the connection but that's 10-30s range.

    Ok, off-topic but there are some very basics that i've learned... i still can't figure what those magical algorithms do but maybe this gives some important info how the technical side works, the mechanics don't lie, they are totally objective, favours no-one.. (but itself, but that's another matter entirely, we don't race against ofline AI..)

    EDIT Oh, one more little detail, some of you who bothered to read that and got some clue maybe interested to know: the physics engine works roughly at ~100Hz. It may go to 1kHz but that is AFAIK the minimum value. It doesn't always have all the data to perform correctly so it makes guesses from time to time. But that should be the minimum rate to have enough accuracy. if anyone know anything different, please, tell me, i'm dying to know the actual rate...
    • Like Like x 7
  2. One could calculate the safe distance vs latency on given speed and draw a graph.. X m/s speed ... Z ms latency .. There's some linkage there to show the exact distance where we have lag issues but too drunk to figure it out.
    • Like Like x 1
  3. LOL, mod gave me a whole thread... Good call.. :sleep: Before i start praising this thing: http://en.wikipedia.org/wiki/Minkowski_sum absolutely genius thing...

    EDIT: It works by using by using minkowski sum of two non-convex polygons and GJK algorithms of determining how far inside two objects have traveled inside between two frames of information. If the latency is great, the impact is thus greater... Worsening the situation but i have no clue if they have min max values, there is "bonestring" parameter in PLR file that is rumored to control just that effect.. Could be worth investigating further. I have no idea how to use those weird mathematical stuff, i just guessed what they do. Seems logical, one calculates all possible space acquired by two Euclidean shapes while staying in contact with each other and retaining their orientation and the other measures the distance traveled in time between those two possible shapes between two frames, results as a positive collision in games, very quick way of doing it, really really clever stuff.. I'm envious of these guys who figure these things out in the first place..
    • Like Like x 3
  4. Sorry Kennett that's too much rocket sience for me. ;) But I really admire your enthusiasm for such things. :thumbsup:
    • Like Like x 3
  5. David Turnbull

    David Turnbull
    PrestoGP Veteran

    as reik says, rocket science kennett, ive come to expect your posts to be huge though, sometimes i dont see what your typing at all, its like trying to find a password in one of nico's posts :roflmao::roflmao:

    thats a joke btw, appreciate all you do mate :thumbsup:
    • Like Like x 4
  6. Sean Greenlaw

    Sean Greenlaw
    PrestoGP Veteran

    If we keep it simple lol, :) One thing i can say is i think this issue is more the side postion of the car that can go a little out of sync. Front to back position must be giving a priority so more accurate, so aslong as we europeans try and give aussies more space on there side and much more difficult for them, they have to give all of us more space, on the side by side battles.
    I try and go into the 2 lane style when going side by side racing with someone for the turn and i try to never run them out of road f1 style. Also if i think if someone may have his nose just ahead of my rear tires i try and leave room, i dont think a guy has to be fully along the side and in your vision to be left room :thumbsup:
    • Like Like x 6
  7. As a general rule of thumb, I don't defend my position and will "leave the guy space" in terms of lanes [left/ right].

    I was passed at Spa by 1/2 a dozen cars without a bump. I like to think that was because of my extra fuel and Medium tyres.:giggle: Sean chased me for a lap after his first pit stop and made a clean pass at the un-named corner after Rivage. I never felt 'worried'. I was very alert and waiting for a pass to happen somewhere, but I wasn't gonna pull over.

    If I have a 'problem' it is that when a car goes to the inside in the braking zone or at a corner, I generally lift and surrender. It is frustrating for me sometimes as that is all anyone has to do to pass me is not be seen and I will "roll over" so to speak. If I can't see you then.... that's the price of Internet lag fear.

    But I have few collisions in a season, so I believe. :)
    • Like Like x 3
  8. Valter Ostman

    Valter Ostman
    PrestoGP Veteran

    Maybe we should report in the chat if we see a twitching car on race day, and then that guy can disconnect and try to get a better internet connection. It's possible to have a good game connection all the way from northern Sweden to Drammen Norway and over to Australia. I could note that when I met Peter on the server this weekend.
    • Like Like x 2
  9. I'll use this thread for my own annoucements and other stuff.. You all know how i can be quite multi-worded in my explanations so....​
    Like i've said in the General thread, new XD is out.. I don't want you to install it.. I alone can use it.. That was a joke, of course.. In fact, you will see that it is THE most important tool you will have. I will predict up to 1 second time drop for me.​
    The reason:​
    XD now shows DELTA TIME ! ! !
    Those who don't know what delta is, here's a short inadequate answer. It's a change between two values. Usually it's used in some relation to time (AFAIK, delta is always tied to time or shows time difference but i am not sure..). This time we are using it to show the difference in time between two laps. You can see this value in real life F1, they have it in the steering wheel, beside gear indicator, speed and revs it's the fourth value and they look at it ALL THE TIME! It's the most important tool for checking your current pace.​
    DOWNLOAD: http://vitumo.de
    Install to Race 07 folder, run DXWebsetup.exe (directX 9.0c) afterwards.​
    After the first run you get an XD.ini named file in your Race 07 folder, it's the configuration file. Change the following line:​
    ; Delta-time calculation to your best lap and last lap
    ; 0 = Disabled (default)
    ; 1 = To best lap only
    ; 2 = To last lap only
    ; 3 = Combine 1 and 2
    Go to the track and try it out now... I'm sure you are amazed and Monza is the perfect track to learn how to use this info.​
    Test it yet? No doubt you want to adjust the sessions info screen position now..​
    ; Session-Info HUD postion:
    ; Default: X = auto, Y = auto
    Those values will put the session info screen on top of steering wheel right in the "windscreen" on 1920x1080px screen and BMW vehicle.. SessionPosX=704 is the value you want to use if you want in to be centered, try out what Y value feels good for you, ie on what height you want the new data to be.​
    You may want increase or decrease update interval, it's the whole XD refresh rate, not just delta. Too fast will give you always changing values that aren't necessarily even true (it can theoretically show each stroke of the engine.. not what we want..), too low rate, well, doesn't give you the info soon enough or it may be outdated.. You may need to play with this value to get a rate that suits you, you are looking for a balance between filtering too sudden changes out and keeping the data fresh.​
    ; Refresh rate (in ms) default: 250
    There you go, i'm incredibly happy, i've tried to calculate/guess this in the past on-the-fly but i could only see the change to the guy in front or back and that delta is between us, not between my own performance...​
    Now it's all there. You can see immediately whether that drivingline is faster or slower, did you brake too late, did you get as good exit as last time etc...​
    EDIT: My XD.ini configuration for 1920x1080 resolution: https://dl.dropbox.com/u/84727521/PrestoGP/XD.ini.zip
    - Delta times activated​
    - Delta time hud located above the steering wheel (FOV85)​
    - Fuel estimate: cycles between these two: last lap liters(average lap liters) <-> laps left based on last lap consumption(laps left with average consumption)​
    - tire temp colors changed to show inside/mid/outside in colors too​
    All else is default.​
    • Like Like x 7
  10. I'm not sure if I understand everything, so would you like to make a screenshot from how it looks like now for you?
  11. ingame screenshots wont capture XD screen..
  12. David Turnbull

    David Turnbull
    PrestoGP Veteran

    use fraps kennett, trial version should do for screenshots.
  13. I got my windows screengrabber to work, i use it to make tutorial etc.. So i had to leave the esc menu in the picture... Well, you get the picture, (pun intended..)


    It now shows quite unusual values, i pressed the screengrabber on the braking into T1 at Monza, it went to desktop, back to game, put it in pause (? really weird...) took the picture and back to desktop... It was suppose to be just before turn-in and showing 0.3s benefit... I did multiple laps earlier with perfect examples but the ingame screenshots failed me, so you'll have to settle on this.

    The delta time is those two green times, showing the difference to best lap and last lap.. This time the best lap was the last lap, well, the only lap... Delta times reset when session changes. It's really nice now to make a slower, smoother base lap and then start to compare your time to that.. You can do practice in sections, concentrating on a single corner etc.
    • Like Like x 2
  14. thx mate!!! Still not sure if I will change because I'm not sure if I need that feature. :) but thx very much!
    • Like Like x 1
  15. Like you see and most likely witness that the info is quite useless in the bottom left corner. There is just no time to check on that, it's really unsafe too since this data is important (for to those who start to use it..) You'll start to check on it after every corner, or pick up a favorite moments on track to check your current pace. I noticed this after just two laps. The location is different on every resolution, i got really lucky as the box size is 512px wide in 1920x1080 resolution.. But it scales according to the screen size so you might have different co-ordinates. Also that position might not suit every driver and every car.

    This takes away some of mystery, i bet our top drivers have very good picture of what their pace is at any given moment, that cranial computer calculating all the time. It may even hinder but i do firmly believe that it's worth it.

    It removes a lot of the uncertainty, lack of facts and judging things by feel. I've had so many moments in these two-three days where i thought i was doing a corner well but didn't and then didn't know that i got the next corner so spot on that i gained all that time back. Also on the practice race i noticed that while i lost to Marko on the Lesmo2 exit, i made that corner better than in my best & last time.. In the past i would've only seen the gap increasing and thinking that i took that corner badly, then tried to change it..
    • Like Like x 2
  16. You have to test it. Luckily we got the return to two week interval, this is really intuitive so it shouldn't take a lot of effort.
    • Like Like x 1
  17. Good to know. I see that as a replacement for the buggy Time Attack with our MMG mod. I'll use it after Monza.
    • Like Like x 1
  18. :)

    • Like Like x 2
  19. I was yesterday with Valter and Peter practicing on sing track 22 minutes server, i and peter had great close fight for many laps practicing overtaking/ defending moves without any problem and then on lap 12 i got just a bit closer to him on turn 2 so i moved quickly to the right to avoid him but it seems if my car " the shadow ? " did not turn and kept going and hit him..

    we were only 3 cars on track and we were hit with sync issue and for sure i will have that in mind keeping more space to the car at the front in the real race but i thought to mention this incident here just to show how this sync issue is always present waiting for the right moment to bite the rear of another car ..

    • Like Like x 4
  20. Thank you for the video Anthony. The bump wasn't a problem and the F1 TV show was close to start anyhoo...

    However, I couldn't help but notice in the video that you may have straight-lined turn 1 by just a bit? Now, I am not complaining, but should we all do that in the race to keep to the same race track? Cut it I mean.

    I am always ensuring that I do not exceed the track boundaries anywhere [the first priority] when I race, but that may in fact be dangerous [for me] when I am slower than the car behind in some places as indicating by that video. All things being equal, I should have been roughly the same speed as yourself if we drove the same lines to the maximum; or am I deluding myself?

    Edit; Anthony and I did have some nasty lag issues. Valter's car appeared as solid as an AI car would. i.e. no visible lag.
    • Like Like x 3