Xtreme Gaming Network

View mismatch between cars racing together - potential bug?

Author Topic: View mismatch between cars racing together - potential bug?  (Read 14199 times)

Offline Gratulin

  • Hero Member
  • *****
  • Posts: 2159
  • Karma: 44
    • View Profile
View mismatch between cars racing together - potential bug?
« on: January 15, 2015, 10:32:19 PM »
I'd like to open a discussion regarding a potential bug in the way AC presents the in car views of adjacent cars to the drivers of those cars.

I had two incidents in Thursday's fun run at Eastern Creek where the lead car's view shows them further AHEAD of the following car than the following car's view shows them BEHIND the lead car.

There appears to be a significant difference between two drivers perspective of the relative positions of each car.

A. The lead car sees following cars further back than they really are. This results in a driver thinking they can take the "racing line" incorrectly.
B. Cars alongside each other can actually be presented with different relative positional information. This results in one car "thinking" they are ahead while the other car also "thinks" they are ahead.
C. A following car sees leading cars closer than they really are. This results in a following car thinking they have "overlap" and entitled to "racing room" incorrectly.

Offline Bird

  • Administrator
  • Hero Member
  • *****
  • Posts: 2324
  • Karma: -666
  • Ysu
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #1 on: January 15, 2015, 10:43:15 PM »
That could be just the latency.  If you're very factual, travelling at high speeds, small amount of latency can result in rather large position-differences.
Say you're pinging at 100ms (1/10th of a second) to the server
travelling at 50m/s (180km/h)  you'll travel 5m during the 100ms.

Now if two people are lagging, it can add up...

Offline Gratulin

  • Hero Member
  • *****
  • Posts: 2159
  • Karma: 44
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #2 on: January 15, 2015, 10:51:05 PM »
Bird, I don't believe it is lag because it is consistent. If it was lag then sometimes it would show the following car closer and sometimes further away.

Offline Wally

  • Administrator
  • Hero Member
  • *****
  • Posts: 11036
  • Karma: 152
  • AC Admin
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #3 on: January 15, 2015, 11:09:02 PM »
Are you talking about the distorted FOV in the rear view mirror that makes cars behind look a lot further back than they really are?
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”

Offline Gratulin

  • Hero Member
  • *****
  • Posts: 2159
  • Karma: 44
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #4 on: January 15, 2015, 11:13:04 PM »
No. It is the view out of front and side windows. For example you can look at a replay and switch between two cars and see the difference in side window views.

Offline Wally

  • Administrator
  • Hero Member
  • *****
  • Posts: 11036
  • Karma: 152
  • AC Admin
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #5 on: January 16, 2015, 08:05:58 AM »
Can you put up some screenshots?
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”

Offline marty

  • Hero Member
  • *****
  • Posts: 3747
  • Karma: -63
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #6 on: January 16, 2015, 12:57:15 PM »
I can put up a video or some screens later, I did check the replay after the race and the t1 incident I wasnt fully clear as I took the apex so partially still at fault but quite a few times in the race after that I had the exact same situation and backed off to avoid contact as I was the car behind and not far enough up to be sure id be left some racing room.

The second contact after spending 15 laps going back from last after the t1 contact that spun me around to battle again for the lead. Then it was a very odd collision in the straight before the second last corner. I need to take another look at it but thought I was holding my line outside as you ran wide corner before and so decended the inside. I had left 2/3 of the track on the inside yet we still collided and it made it a rather frustrating race at the time. Its possible we both may have moved towards eachother a bit so really need to take a second look at that.

I will take another look at it and can post a replay showing how it looks from both cars. In the end its only a fun race but here are some people I am more aware of and try to give extra room. Even during one of the races I did give someon else a bit of a bump when passing on the inside. He didnt get spun but it was still my bad as the car pushed a touch wide off the apex and ran him a little off the road.

Offline Bird

  • Administrator
  • Hero Member
  • *****
  • Posts: 2324
  • Karma: -666
  • Ysu
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #7 on: January 16, 2015, 01:42:33 PM »
Bird, I don't believe it is lag because it is consistent. If it was lag then sometimes it would show the following car closer and sometimes further away.
No. It is the view out of front and side windows. For example you can look at a replay and switch between two cars and see the difference in side window views.

That's exactly what I'm talking about.   At the quoted speed of 180km/h and consistent 100ms latency for both parties, the cars would appear 5-10m away from their real location as viewed from each other's viewpoint  - and each would see the other consistently in a different place.

It's hard to illustrate, but if you don't understand what I mean I'll draw up something.

Disclaimers: :)
I've used 100ms & 180km/h so there's a nice significant number to play with - 5-10m - I know that usually we run <50ms latencies to the server.   And I do not know how much AC itself compensates for this and in what way.

p.s. network latency is a normal thing - if someone thinks it's not - it's the time one piece of information takes to reach the server and come back (look at "ping" or "network latency" for more detailed info).  On very good (eg fiber) networks, this is close to nothing from point-to-point (i.e. from house to ISP) but when the info needs to hop from server to server (if you do a traceroute to nearly anywhere you can see these hops) Each server needs to process & forward the information so the lag increases.   But I digress.


p.s.2 the relative difference in location as appearing for each other is also dependent on the software, that's very true.  Even something as basic as frequency of the server reading/writing data to and from clients is a factor.  And we're talking about very quick responses.   10ms = 0.001s !  We're talking about a thousand/s frequency.
« Last Edit: January 16, 2015, 01:56:16 PM by Bird »

Offline marty

  • Hero Member
  • *****
  • Posts: 3747
  • Karma: -63
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #8 on: January 16, 2015, 02:20:57 PM »
I think Gratulin is not quite talking about the same thing Bird as he only has his replay file and is going by how it looks from the 2 cars involved in the incident. So how it looks on your own replay file is not really dealing with any difference to the car positions both users would see due to networking delay. Its only viewing the scene as you see it and already has any lag so youd need both users replay files to see what your talking about I think Bird.

If we had both his and my replay files then you could compare how it looked to us both also seeing if the lag has much effect or if the net code deals with it well. You can drive door to door fairly well and at pretty high speeds so the predictive code is doing ok in most cases and actual positions cant be that far off. It would be interesting to get Gratulins replay file and see if the actual positions of cars are much different at the points of impact but I dont really think lag is what caused these incidents. It was just both of us wanting the same piece of track while assuming the other wasnt where they were. The second one had a very odd collision also as we hit on a straight and I got shot off spinning to the right so lag may have been more of a factor here as it likely exaggerated the impact.

There clearly needs to be some predictive code going on as even a server at 20hz so 20 positional updates per second with for example 50ms ping. The way I interpret this is the actual delay would be adding both users pings so if both are at 50ms then total delay would be 100ms, as your info needs to be sent to the server and back to the other guy. Then add to this any input lag or rendering delays and you may not get an actual delay of 140ms or so with 2 guys that have pings around 50ms. I am pretty sure the netcode would be rubbish if it wasnt trying to allow for this and use some sort of predictive positioning based on car speed and driver inputs.

If this was out 10m or so all the way around then I think it would make it nearly impossible to race close. That is with 2 relatively low ping users but we can even race guys with 350 ping ok now since v1 and this to me shows the code is mostly ok at predicting positions.


Offline Bird

  • Administrator
  • Hero Member
  • *****
  • Posts: 2324
  • Karma: -666
  • Ysu
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #9 on: January 16, 2015, 02:43:30 PM »
Maybe it's in one replay but caused by the same effect?   (i.e. the code trying to record what the other player might really see?)
Ok I'll shut up now. I dunno.  :)

Offline marty

  • Hero Member
  • *****
  • Posts: 3747
  • Karma: -63
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #10 on: January 16, 2015, 03:19:17 PM »
Maybe it's in one replay but caused by the same effect?   (i.e. the code trying to record what the other player might really see?)
Ok I'll shut up now. I dunno.  :)

You do have a point Bird and it would be interesting to compare its just that its most likely a different point to what Gratulin was trying to make.  ;)

I think find finding out how different things look from each user would be quite interesting and the replays I am pretty sure just record what you see. The Italian method may randomize this a little so each time you see the replay you see it differently just to hide bad code and always make the other guy appear to be at fault.

Offline marty

  • Hero Member
  • *****
  • Posts: 3747
  • Karma: -63
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #11 on: January 16, 2015, 05:38:25 PM »
I took another look at the replays and made up a few quick videos showing some angles.

Here is the t1 incident and after reviewing the footage IMHO I did nothing wrong and at the point I am turning in am clear inside, got tagged very late. I was actually more surprised there was no redress after this incident, I also have a slow mo of this and it actually shows that there is either a lag or collision box issue with this mod. There were a few centimeters between cars even at impact so quite likely the collision box is not great on the mini so it could be lag or it could be the mod and so its a little unlucky if the mod is to blame as then we both would have continued on without any contact but racing room only needed to be given by the car behind in this case due to never overlapping until contact was made.

I turned in it was clear so a car shouldn't be trying to make a move so late into a corner because there is no reason for the car ahead to leave racing room for a car that hasn't got even a bumper alongside before the apex.

[youtube]jTVxD3ZdHlE[/youtube]

Then after 15 laps chasing down Gratulin who was leading the race at the time I got back to the front this incident happened on the last lap.

Looking at it I see Gratulins car moving up and into mine while I have left plenty of room on the inside, I may have drifted a couple centimeters inside just before the collision but pretty much holding a line where the inside car is drifting up out of the turn the entire way quite hard.

[youtube]i5ikm4xPGAs[/youtube]

Both incidents I dont think are deliberate but just a lack of spatial awareness. The second incident I think if your driving side by side with someone you should never be moving across so much as the outside car doesnt need to give you more room then you already have in my view.

This is quite common and even though I wasn't exactly on the very edge of track there is no reason for me to alter my line and give even more room then I have already given. There is 2/3 of the track available on the inside there and I think Gratulin has driven me off the road. The earlier part of this corner is tricky as side by side there are some small kinks but I made sure I left enough room for the other car on the inside of those apexes. If the inside car needs to lift off or slow on exit to avoid colliding with the car on the outside I think they need to. Not just assume the outside car is going to back off drive off the road and leave them the entire track to use on the exit.

Here is the t1 contact in slow motion, most interesting part is that there is still a gap at point of contact and also at no point was there an overlap so I think even though the collision has a bug its the car behind at fault here for a basic punt of the road mid corner.

[youtube]vY4Eec7upGg[/youtube]

Here is t1 incident looking from gatulins car.

[youtube]BHd4qWtimMs[/youtube]

Offline Guybrush Threepwood

  • Hero Member
  • *****
  • Posts: 2133
  • Karma: 69
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #12 on: January 16, 2015, 06:21:02 PM »
When I look at my own replay, incident 1 was Gratulin's fault.  Mistakes happen, etc.

Incident 2 was a little strange.  Gratulin was washing toward the outside of the track, but then when he is kind of in the middle of the track it looks like you turn in slightly towards him Marty and collide.  It's hard to tell whether Gratulin would have held his line toward the centre of the track or would have hit you anyway but he probably thought you would hold the racing line on the outside of the track.  No-one to blame though and a racing incident IMO.  It's worth watching from Gratulin's view though.  Not that it really matters, it's all fun.

Offline Wally

  • Administrator
  • Hero Member
  • *****
  • Posts: 11036
  • Karma: 152
  • AC Admin
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #13 on: January 16, 2015, 06:37:32 PM »
The most important thing about the last race 1 incident is that it gave me the win!

It does look like Gratulin moved across into Marty, but would have to see cockpit view from Gratulin's car. I know it's only fun, but these are good opportunities to learn from.
“You can please some of the people all of the time, you can please all of the people some of the time, but you can’t please all of the people all of the time”

Offline marty

  • Hero Member
  • *****
  • Posts: 3747
  • Karma: -63
    • View Profile
Re: View mismatch between cars racing together - potential bug?
« Reply #14 on: January 16, 2015, 07:44:04 PM »
Nobody is asking for a public flogging here its more a learning thing for everyone, some may like that sort of thing though I heard GB is into spankings at least.

It would be interesting to see the same 2 incidents on Gratulins replay file to see how things look there and if lag made him think he was overlapping me into t1 more then anything. The second one is an odd incident and probably needs to be seen from both cockpits to see if there were any steering inputs to suggest both were moving towards the middle of the track. Gratulins car has moved from the kerb outside at a pretty steady angle with no real suggestion of straightening and maybe my car was under-steering and then regained front grip just a split second before impact causing a minor turn back to the middle but its only very minor if any compared to moving a few car lengths across from the other car.

 

SimplePortal 2.3.5 © 2008-2012, SimplePortal