Basically, I use this code at the top of most of my games:
sync on
sync rate 0
autocam off
hide mouse
set display mode desktop width(),desktop height(),32,1
sync
sync on. This means it won't try to render at every line of code.
sync rate 0. This makes it so DBPro will not limit the FPS.
autocam off. This just turns autocam off. For more info read the DBPro docs.
hide Mouse. Exactly as it says.
set display more. Sets the resolution to the user's desktop resolution, sets the bit depth to 32bit, and
turns VSync on.
EDIT: sync. Syncs once because the first sync never does anything.
By turning VSync and sync rate are 2 different things, although they often achieve the same thing. Sync rate simply eats up all your CPU's clock cycles and limits the FPS. VSync doesn't eat all your clock cycles, and provides a more stable FPS. The only drawback is that without decoupling the display loop it will always run at the user's monitor's refresh rate.
Clonkex
Making games is easy.....finishing them is a different matter.
Intel Core 2 Duo 2.8Ghz, Nvidia GeForce 9400 GT 512mb, 1gb ram.