jamessanford / assetto-corsa-deltabar

DeltaBar - iRacing-style bar with variable color
29 stars 4 forks source link

tracks where start line of track is a high AI spline position (like 0.80) don't work well #7

Open jamessanford opened 9 years ago

jamessanford commented 9 years ago

For example, the Nordshleife AI spline starts at something like 0.80, and becomes 0.00 after you've been driving a minute. The current code ties the lap start and the AI spline too closely, and also assumes the AI spline position will only increase as we drive around the track.

Here's a comment from commit d03edbe004d640e722769d4f7b369ce887415ab9 :


I think the Nordschleife doesn't work very well with DeltaBar because the AI spline doesn't "start" at the beginning of the track.

Needs some bug fixing, like "when the lap timer starts incrementing, use the current location as the start, and allow it to wrap around zero", so that a recorded Nordschleife lap can look something like "0.80", "... 0.99", "1.00", "1.10", ... "1.70", "1.79"


jamessanford commented 9 years ago

I think this is more difficult than it initially seems.

I wrote a workaround at c635cd08ebda629f9631900e3e4956b005811448 but then I realized it probably does not work right, because AC doesn't always "start the lap timer" in the right spot -- sometimes it leaves it running.

https://github.com/jamessanford/assetto-corsa-deltabar/tree/issue_7

jamessanford commented 9 years ago

commit c635cd0 probably also has bugs if you drive back and forth over the point at which the AI spline wraps

StoneSpb commented 9 years ago

Need time to go deeper into internal logic - right now it looks like a magic =)