Fluid Byte wrote:I see you put a point (".") after all the values. I can understand that would define the values as floats and is the same as writing, e.g. "1000.0". But does this have any effect on the calculation or is it just cosmetic?
It is the same but in my way i just save to write a zero
Fluid Byte wrote:Another point is the value of '16' for the Delay() command. Why exactly this value? I noticed it is similar to the 'TimePerFrame' value, are these two connected? If yes, would that mean that you have to adjust the delay when you change the 'FrameFreq' value?
That is an old issue:
http://www.purebasic.fr/english/viewtopic.php?t=12825
I commonly use that trick in almost all my 60Hz fullscreen progs, it really works!
Fluid Byte wrote:One more thing, if you wanted to adapt this method for an application are you still tied to the framerate or is there another technique? I guess if that is true you would use DesktopFrequency(), wouldn't you?
For most apps I don't find any reason to use another freq than 60Hz (and that is a good freq for the desktop too if a LCD display is used). Anyway, if you wanna use other vertical frequency different, then the formula to get the Delay(x) is: x.l=1000./freq.f
There must be other methods to do smooth movements while saving CPU time in windows, for example using "Multimedia Timers" but there is at least a "perfect" way (which is the one used by a SEGA emulator for windows called KEGA FUSION) i still don't know how to do, since Steve Snake (the author of KEGA FUSION) does not give the sources. There are more threads about this in this forum.