Thread: Feature Request Bubble Column FPS
View Single Post
Old 12-05-2008, 04:22 PM   #14
Jim Sachs
Developer
 
Jim Sachs's Avatar
 
Join Date: Dec 2000

Location: Southern Oregon
Posts: 9,771
The timing clamp limits the amount of frame movement when the MA thread takes an unusually long time to regain control.

When I first started programming, each type of computer had a set clock speed and each thread had total control of the machine until it ended. So, on the Commodore 64, I could move a flying saucer 2 pixels each time through the loop, and I knew how fast it would be travelling. Then clock speeds started to increase and computers became multi-tasking, so now I have to calculate how much time has passed since the last time I moved an object, and move it an appropriate distance to maintain a constant speed.

But what if the computer halts my program while it goes and checks for Network signals or some such nonsense? It might be gone for a full second or two, and my fish would suddenly jump to where it would have been if my program had been running all that time. It looks a lot better if the action just stops for that amount of time, then picks up where it left off. The Timing Clamp adjusts the maximum amount of time that the program will wait for control.

During Beta testing, I've left the adjustment in place to test for maximum smoothness.
Jim Sachs
Creator of SereneScreen Aquarium
Jim Sachs is offline   Reply With Quote