SCRMaps
/
Sign in

Time and frames

One second on the Countdown Timer is not one second.

4 min read

To measure time in a map you need to know how StarCraft counts it. Everything below is at Fastest; the ratios change at other speeds.

The reference numbers
프레임24 frames a second; one frame is 0.042 seconds.
Normal 속도About 15 frames a second, 0.067 each. Normal to Fastest is 42:67, roughly 5:8.
카운트다운 타이머One timer second is 0.672 real seconds. It is not real time.
인게임 타이머Matches real time.

Ask the Countdown Timer for 30 seconds and you get about 20 real ones. Anywhere the exact duration matters - an AFK judgement, a round limit, a save eligibility window - the Countdown Timer will not do what your design says.

Serious maps therefore count for themselves with a death counter. With hyper triggers the loop runs every frame, so you add one per pass and call 24 of them a second. That way there is exactly one definition of "a second" inside the map.

const FPS = 24;        // 한 새 초의 새이클 수 / cycles in one real second
var tick = 0;  var seconds = 0;
function tickClock() {
    tick = tick + 1;
    if (tick < FPS) { return; }
    tick = 0;
    seconds = seconds + 1;
}
The idiom that keeps one definition of a second.

A second source of truth for time will drift. The most common accident is copying a constant from another map that assumed a different frame rate, and the symptom is a timer running at twice the intended speed.

Sign in to track your progress