Hi Ian,

Yes, you are quite right. You have to keep track of the amount of time
that has elapsed else your game objects will bounce around the game
like jack rabbits on speed. LOL!

As you said some of the old Dos games didn't do that, and it was
pretty amusing to try and play one of those games on say a Pentium 166
MHZ when the game was designed for say a 50MHZ processor tops. I had
games that would start up, play the music at for or five times normal
speed, and then show me a game over screen all because the frame rate
wasn't based on elapsed time. The author wrote it for a 286 or maybe a
386 never considering what would happen if it were played on a system
twice as fast.

Cheers!

On 7/30/13, Ian Reed <[email protected]> wrote:
> And if I can add to that concept you can also base that speed on the
> amount of time elapsed since the last frame.
> That way if you are holding forward you move at the same speed
> regardless of whether you are getting 30, 60, or 100 frames per second.
> So for example:
> float distanceTravelledThisFrame = secondsElapsedSinceLastFrame *
> playerSpeedConstant;
>
> Some very old dos games had speed problems when run on a faster computer
> because they were updating your position based on how many times the
> processing loop ran in a second rather than how much actual time had
> elapsed.
> You may remember games like Space Quest that had a speed setting so you
> could adjust this to be reasonable for your computer.
> But they didn't have enough settings to keep up with the rapid speed
> improvements of computers, smile.
>
> Ian Reed
>

---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to