joshjaysalazar / iRacingSafetyCarGenerator

Software to generate custom safety cars during an iRacing race
GNU General Public License v3.0
4 stars 2 forks source link

Option to only throw incident-based safety cars for incidents in the same part of the track #22

Open joshjaysalazar opened 6 months ago

joshjaysalazar commented 6 months ago

Is your feature request related to a problem? Please describe. As of right now, incident detection covers the entire track. So, if you have off-track detection set to throw safety cars once 4 or more cars go off at the same time, those 4 cars can all go off at different corners and still trigger the safety car.

Describe the solution you'd like An option should be added (able to be toggled on or off) which adds an additional parameter to fulfill of cars needing to be within a certain percentage of the lap distance to be counted. For example, they must all be within the same quarter of the track.

Describe alternatives you've considered This could also be done by time gap, although that would require a bit of extra math.

Additional context N/A

praneetheus commented 2 months ago

I am interested on taking this on, what is the process for testing?

joshjaysalazar commented 2 months ago

I am interested on taking this on, what is the process for testing?

In the case of this particular issue, I'd say it could be tested with AI races at first, though it may require some patience.

You can also always ask for help in the BWRL Discord, set up a one-off race with the intention of testing all of the issues you can think of. We did that for the initial launch of this around a shorter track, and it ended up being pretty fun. We ran with a few people from the league and a bunch of minimum-difficulty AI, and just called out what we wanted to test over voice chat. And then eventually we just set everyone loose for a bit of a destruction derby for the remainder of the session. I wasn't driving myself for that, I was in observer mode so I could check replays and see exactly how it was behaving.

As a side note, if you do dig into this, keep an eye out for logging to be added, as that's the issue I plan to work on next. That will be really handy for testing.