PDA

View Full Version : Standings Shuffle After Finish



SenorPez
14-01-2016, 17:59
A question out there for more experienced programmers with the data stream, just to make sure that I'm not going crazy.

In one of the videos (https://www.youtube.com/watch?v=e2bNTd3jYXo) I'm using to both document my recent (unskilled) career exploits in PCARS and play around with the Replay Enhancer (https://github.com/SenorPez/project-cars-replay-enhancer), I noticed that the standings as the replay ends (that's when PCARS cuts off its replays, unfortunately) and the results screen put out by the Replay Enhancer differ.

Standings at the end of the replay -> Standings at the replay box

Monnur -> Monnur
Ehard -> Khalzov
Ojeda -> Tischner
cho -> Koskinen
Boudet -> Araujo
Khalzov -> Wiegand
Tischner -> Garzillo
Koskinen -> Ehard
Araujo-> Ojeda
Wiegand -> cho
Garzillo -> Boudet
Lietzow -> Lietzow


There are couple of oddities about this:

There are 4 distinct groups. First place, last place, and two in the middle.
Excepting first and last place, which didn't change, standings within each group didn't change... each group just shifted, as a whole, either 4 places up or 5 places down.
Most strange of all, these changes are actually in the telemetry data, but shows oddities there. For the group that gained positions (Khalzov through Garzillo), each of them gained all 4 positions INSTANTLY (but at different times for each individual car in the group), meaning the group that lost positions all decided to stop in the exact same place to get their doors blown off. Note that this is, frankly, impossible, especially since in the video, there's a car that's going to pass my (winning) car a few seconds AFTER I'm finishing the race. What... did he decide to lock them up and let a bunch of dudes past?


All of that seems like it's a factor of the game stopping the simulation (or actually despawning) cars after the player car finishes.

Now, there's an easy enough fix for this: Just find the first (rather than the last) RACESTATE_FINISHED, and be done with it.

But here's my question: Does that mean Project CARS doesn't support "racing to the line?" In most race series, when the leader finishes, the field isn't frozen; you still race to the line to determine positions 2-x. Right? Or does Project CARS freeze the field when the player car (in career) crosses the finish line? Or is the behavior I'm seeing (which is only in the telemetry feed for this one race so far, btw) a bug or something?

SenorPez
14-01-2016, 18:18
Self-reply is best reply. It's like I'm talking to myself without social condemnation!

Okay, I looked a bit deeper (and found another issue, but that's outside the scope of this discussion).

It appears the standings in the UDP packets (I'll cross-confirm with an actual in-game results screen... but I hope it's not true!) shuffle according to lapped traffic. So for whatever reason, the packet data reorders the standings based on when the car crosses the line. So in my example, Khalzov through Leitzow are all down a lap. But they're all ahead of Ehard, Ojeda, cho, and Boudet (there's no intermingling of lapped cars and non-lapped cars... that's a nice touch?), so the order they CROSS THE FINISH LINE TO END THE RACE (which is different than finishing order!) is reflected in the telemetry. This isn't seen in the other videos, since I'm awesome and lapped the entire field. (I should also crank up the difficulty, but whatever.)

Like I said, I know I have a screenshot of the classifications page in-game... I really hope that game isn't giving Khalzov 2nd place points... that would be completely wrong.

STEELJOCKEY
15-01-2016, 01:00
Are letting the race timer count down to the end or quitting out before the count down has finished?

SenorPez
15-01-2016, 16:18
Are letting the race timer count down to the end or quitting out before the count down has finished?

I did a little deep dive into this last night, in part to solve my Replay Enhancer issues.


The race end screen actually shows the shuffling finish positions as you watch the end of the race (though you can't actually "watch", other than that end timing screen). Cars are classified by their race time; that is, when they cross the finish line after the leader crosses the finish line, with no regard to laps down.
However, the game does properly assign finish points with regard to laps completed and finish time. That is, cars a lap down, despite having a race time that may be less than lead lap cars (which is correct) are correctly classified after the lead lap cars.
If you wait for the race end screen to fully populate before ending the race, as near as I can tell, the cars can race to the line. So within the lead lap and lapped groups, standings can still change.

The telemetry feed remains active (for races to the line and whatnot) for as long as you wait on the race end screen.

If you end the race before all cars finish, as near as I can tell, the standings are frozen.

I'd kind of like folks to test these two, but I don't want to impose.

You can save the replay (I'm talking Career mode here) at any time. As you may notice, replays run from the start of the race (just before, actually) to when the player car crosses the line. So you don't have to wait until the race end screen fully populates because, unfortunately, those races for position that don't involve you aren't going to be seen.


I guess the main takeaway from this is that for the ordinary player, none of this really matters. Your finish position isn't going to change, you'll get the proper points, etc. But when you're running crazy, like me, trying to put some broadcast overlays on replays, there are a few sharp edges that should be observed. Proper procedure will keep you from getting cut. ;)