Getting Consistent speeds

Hi all

Ive been developing this -

www.willgoldstone.com/impactsp

on an old ibook G4(900mhz, 700mb ram, 32mb gfx card), and have it running at a playable speed. But upon returning home to a desktop pc thats reasonably speedy given a 256mb gfx card and decent ram cpu, I found the game unplayably fast. Is there a way I can restrict its behavior on different platforms by setting a defined frame rate? I hadnt considered this until now… oops.

Thanks

Will

The trick is never to assume you’re running at a specific frame rate. Instead, multiply in Time.deltaTime whenever you’re updating positions. This way you’ll be having speeds that are measured in units/second rather than units/frame.

Edit: As a quick fix, you could move all your update code to FixedUpdate - that way you know exactly how many frames/sec you’re getting in your update calls.