Website archived by minesweepergame.com

Timer Lag

From MinesweeperWiki
Revision as of 14:57, 9 May 2012 by Damien Moore (talk | contribs) (→‎History: fixed link)
Jump to navigationJump to search

<keywords content="minesweeper, timer, bug, drag, time, windows, game" />

Timer Lag is when the minesweeper clock counts slower than real time. This is a bug of all Windows Minesweeper versions before the release of Windows Vista.

History

The first known person to discover Timer Lag was user "Swannaplay" in the Minesweeper Yahoo! Club. On 21 Oct 2000 he said a slow clock had helped him set new minesweeper records, before he realised the mistake. Gregory Lewis (USA), the admin for the club, replied he once had the same problem and it was caused by a low CMOS battery.

Timer Lag was discovered again by Georgi Kermekchiev (Bulgaria), who posted about it in the Guestbook on 3 Jun 2001. He found that "when watching some downloaded videos that the time counter of Minesweeper does not count seconds" and that on his computer "the counter approximately shows 96 for the real 100 seconds". Matt McGinley (USA) replied this was unlikely because the Timer Jump bug suggested minesweeper used the system clock. However, when Matt watched an 82 second Camtasia video he found it took 85 seconds! Marc Schouten (Netherlands) wrote "there's nothing wrong with the timer in Minesweeper. It runs perfectly synchronous with the system timer. If there's a discrepancy between the actual time passed and the time displayed by the timer in a recorded movie, it's because the movie doesn't play at the same speed at which it was recorded."

The following day, David Barry (Australia) noted, "I just checked the timer (in the actual game) against my stopwatch... After 190 seconds were showing on the timer my watch said it was about 201. There was also about a 10-second lag over 3 mintues when I checked it against the system clock. So I don't think that it is just the video. I think we shall all have to hope that whatever timing mechanism is used, it is consistently slow across computers... otherwise my times may be invalid." This was a surprise, and Marc replied, "There is no discernible difference between my game and my clock. I've ran the game for 5 minutes and the difference, if any, was less than half a second. 190 seconds instead of 201 means the game is about 5% slower than the clock. That's 3 seconds on a 60s game!"

Georgi then let a minesweeper game run on his computer for 500 real seconds and found the game clock reached only 480. He warned, "If the speed of the counter depends on PC configuration than all records are not made under the same circumstances". Joe Nuss (USA) also checked and found the clock showed 58 after 60, 97 after 100 and 223 after 230 real seconds. However, when he compared the system clock to a stopwatch there was no difference. This begged the question if Winmine really did use the system clock as a reference. Marc had found Winmine to be synchronised to the system clock the first time he checked, but a second test suggested this result had been a coincidence.

Roelof Smit (Netherlands) also performed tests. On his computer the game clock showed 97 after 100, 193 after 200, 288 after 300, 384 after 400 and 480 after 500. David did several tests on different settings. At both 87% and 57% system resources used there was a 13 second lag after 500. Using WinAmp to play music or using Camtasia to make videos at 8 frames per second increased lag to 16 seconds. Increasing Camtasia to 10 fps increased lag to 17 seconds. He also tested the Minesweeper League version and found no lag whatsoever. He suggested minesweeper calculated "how many dummy loops it would take to last one second" and then used this "as a delay-routine for the timer". Marc agreed this was a possibility and that system clocks were most likely accurate and thus the lag resulted from a programming decision.

The community was now aware of two issues: the game clock had a timer lag on some computers, and video playback on some computers also lagged. Several examples of this second problem were now found. When David watched Lasse Nyholm's 50 second Expert game the video lasted 52 seconds, the 54 game by Dan Cerveny lasted 57 seconds and the 62 game by David himself lasted 64 seconds - but videos made on Marc's computer had no lag.

An anonymous user 'Surfer' then posted more results from testing the first problem. There was no timer lag on the Minesweeper League version, as previously noticed. After 500 seconds the game clock showed 480 on Winmine (Windows 3.11), 480 on Winmine (Windows 98), 474 on Narkomania and 473 on Hexmines. (Dan Cerveny found it also took 480 on Winmine from Windows 2000). He also noticed that his system clock skipped to the next second several times over the course of 500 seconds. Tests by others showed the system clock does jump but keeps accurate time compared to a stopwatch. 'Surfer' also pointed out that none of this mattered, because over the course of a game the Timer Lag cancelled out the Timer Jump bug!

Matt decided to collect the discussion so far and wrote an article for his site, Intermediate Hall of Fame, entitled, "A Clockwork Mines". About two weeks later, on 27 Jun 2001, he scored a 10 on the Dreamboard and Timer Lag was instantly forgotten in the excitement and ensuing controversy.

Summary

The game clock of Windows minesweeper in versions before Vista is not accurate. Aside from the Timer Jump problem, the game clock often suffers from a Timer Lag and runs slower than real time. This might be caused by using a slow computer with little memory, and is definitely made worse by running other programs at the same time. (The author recalls a story of a Solitaire player on Windows 3.11 who found the clock stopped completely when the printer was used.)

The author tried to reproduce this problem in June 2010. On his original laptop running Windows95 with 8MB memory the lag was 11 seconds after 500. Running Camtasia at 15fps increased lag to 20 seconds. On his current laptop running Vista with 3GB memory, lag was 3 seconds but increased to 6 seconds if music was playing using WinAmp. Since Marc Schouten experienced no lag on his Windows2000 system with 128MB, Timer Lag is not purely a direct result of memory. However, lag does result from your computer running multiple programs at the same time, which suggests game programming as the main cause. From personal experience, heavy program usage not only slows the clock, it delays the opening of squares and slows mouse movement. In effect, any advantage from a slowed clock is lost.

A second type of Timer Lag occurs when watching videos of games. This lag results from using a slow (or slowed) computer which is unable to render the video quickly enough.

Links