Varying speeds w/ different fps

Started by
2 comments, last by Tigra7 21 years, 4 months ago
I created a small program that rotates 3 Pyramids. Whenever I turn on and off the v-sync and raise or lower the screen refresh rate, the program seems to change the speed of the rotation. For example, when I turn v-sync off, the speed of the rotation is very fast. I was wondering if on different machines with different settings, how to keep the speed of the rotation the same as it is run on my computer''s settings. Is there a way to temporarily change those settings on there machine?
Advertisement
quote:Original post by Tigra7
I was wondering if on different machines with different settings, how to keep the speed of the rotation the same as it is run on my computer''s settings. Is there a way to temporarily change those settings on there machine?


This is something I''ve been wondering as well. It seems anything I create in OpenGL runs three times faster on someone else''s machine. I know buying a new video card will probably solve the problem, but I don''t want my rotations to be spinning out of controls or too slow on different people''s computers.

What's happenning is you're updating things each frame, so if someone gets more fps they update more in the same amount of time, making it happen faster.

This can be fixed by calculating the amount of time that has passed since the last frame, and using that value to adjust your speeds.
Look here at gametutorials.com for a tutorial on how to do that. (at the bottom, Time Based Movement)

------------
MSN: nmaster42@hotmail.com, AIM: LockePick42, ICQ: 74128155
"It's all part of the conspiracy of conspirators conspiring to conspire their own conspiracies..."

[edited by - LockePick on December 14, 2002 6:54:50 PM]
_______________________________________Pixelante Game Studios - Fowl Language
Use a timer.

Height Map Editor

This topic is closed to new replies.

Advertisement