In most programming environments I've worked with, one of the best ways to deal with motion of objects in the game is to have a master loop which does something like the following:
do forever:
compute the elapsed time since last update occured(T)
update all objects based on the value of T
obj1_velocity_x = obj1_velocity_x + obj1_accel_x * T
obj1_x = obj1_x + obj1_velocity_x * T
...
update the screen
The thing I'm not getting is how the above approach will work with a specified SYNC RATE? What does DB do if we have surpassed the SYNC RATE... sleep?
Also, does the SYNC command wait for a vertical sync on the video card?
Thanks,
Ed