srobo / srcomp-mixtape

A service which plays tracks throughout a competition.
0 stars 2 forks source link

Assumption that matches don't start at exactly the start of their "slot" #23

Open PeterJCLaw opened 1 year ago

PeterJCLaw commented 1 year ago

Matches in SRComp are represented as having two timing boundaries:

The game portion is at most the same duration as the slot, though for practical reasons is likely to be non-trivially smaller. However there is nothing which requires that a game be in the middle of a slot. While that is the most common configuration, it could be at one end or the other.

Mixtape on the other hand assumes that it can listen to the event stream for the match events, which are fired when the stream detects that the "current" match has changed. (The bounds of the "current" match are those of its slot).

As Mixtape has no other source of timing information: if a compstate were configured which had the game starting at the start of the slot then mixtape would always be "late" to the start of the match -- the match even from the stream would happen a few seconds after the actual start time (the stream polls for changes about every 2 seconds) and mixtape is downstream from that.