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?
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
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!
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
Popular Topics
Advertisement