🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Timing

Started by
0 comments, last by Spur 24 years, 5 months ago
How do you prevent your game to go too fast on better computers? In Delphi you use timers, but how do you otherwise make your objects to move e.g once in 25 ms and not faster?
Advertisement
Don''t rely on frames, use MS deltas instead.

That is... don''t say an object moves 50 pixels per frame... say it moves 50 pixels per second, then each frame, figure out how many milliseconds have passed and move a fraction of that 50.

If you do a DDFLIP_WAIT you''re inherently bound to the refresh rate of the monitor, say 50-75 Hz.



Mason McCuskey
Spin Studios - home of Quaternion, 2000 GDC Indie Games Fest Finalist!
www.spin-studios.com
Founder, Cuttlefish Industries
The Cuttlefish Engine lets anyone develop great games for iPad, iPhone, Android, WP7, the web, and more!

This topic is closed to new replies.

Advertisement