Skip to content
This repository was archived by the owner on Dec 12, 2022. It is now read-only.

[Feature] Expand the TimerInterface to reduce the chances of missing splits #27

@kitlith

Description

@kitlith

Currently, the interface consists of the current gametime, a gametime -> seconds conversion factor, and an Action. The Action is encoded using an enum with states for splitting, pausing, resuming, (re)starting, etc.

Recently, I've written an autosplitter that uses this interface, and I noticed that sometimes it just fails to notice a split (EDIT: specifically when working with Portal. I have not tested with Portal 2). I've traced this to splitting occurring in-between loading and resuming, and can only assume that the split happens and then almost immediately afterwards the game resumes, so I miss the split event. This may simply be an issue of not polling often enough, but this is not entirely under my control.

I'd suggest making pause state a separate Boolean (or a single bit in the Action variable) so that the other actions (which are relatively infrequent) are easier to detect. Optionally, I'd suggest adding an additional gametime variable for 'time of action', in case the current gametime variable is updated before the action is detected. (this would also allow for detection of actions when the action type has not changed, e.g. two splits in a row, since there are no longer pause and resume events to help seperate them.)

Metadata

Metadata

Assignees

No one assigned

    Labels

    LiveSplitInternal Timer Interface.investigateIssue needs more time to be resolved.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions