ROMaster2 / LiveSplit.VideoAutoSplit

Video Auto Splitter for LiveSplit
MIT License
39 stars 14 forks source link

Implement "maybe" VASL logic #24

Open ROMaster2 opened 5 years ago

ROMaster2 commented 5 years ago

Pausing/Splitting/Starting should happen when you think they happen. "Maybe" logic triggers those events, but undoes them if it turned out to be incorrect.

kenman345 commented 5 years ago

So, would maybe logic include some sort of popup asking for a few seconds (maybe 10-20 by default but also configurable), if that was supposed to split, and if you confirm it, then it uses the original time it expected for the split to happen.

Maybe logic could also include if it thinks it should split, but within a certain window of time it gets a higher confidence level to split, would ignore the first time, while also working with the prompt I suggested above.

ROMaster2 commented 5 years ago

Ideally it should be scripted to tell the "maybe" if it's correct or incorrect at a later time. Here's a example that I believe would work, but is far from elegant:

split
{
    if (features["foo"] > 70.0)
    {
        // Current time plus 10 seconds
        vars.lastSplitTime = timer.CurrentTime.RealTime.Value.Add(new TimeSpan(0,0,10);
        return true;
    }
}

undo
{
    return features["bar"] > 80.0 && timer.CurrentTime.RealTime.Value < vars.lastSplitTime;
}