Code Bits: Set Interval
Set Interval is a fairly simple function that can operate separate of the timeline. Instead of counting frames, it will count milliseconds. This is useful for establishing a timer or making your game the same on all computers, regardless of framerate. Here is an example of it in use:
Timer = setInterval(function () {
seconds -=1;
}, 1000);
Okay, [...]
