Results 1 to 4 of 4

Thread: Fps management

  1. #1

    Fps management

    Hi everyone. Can someone please show me how to take control of the frame rate in my game written in Delphi 6 & DelphiX? The dxTimer interval is set to 0 and I achieve the following frame rates: Slower machine - 70 fps, Medium machine - 300 fps and very fast machine - over 450 fps. How can one hard code the fps so that it runs at 300 fps (the ideal rate) on all the machines mentioned?

    Thanks for your help :-)
    Wake up from the dream and live your life to the full

  2. #2

    Fps management

    Setting the interval to zero means your game will run at the maximum speed. This isn't always the best thing, however, because it will also mean that your game will run at different speeds on different machines (as you discovered yourself).

    To counter this you could try a different setting, say for example 16, (~60fps) which will give similar speeds on different pc's.... most of the time anyway.
    In case of 2d games, 60fps usually is more than enough.

    However, if you want speed to be the same on all pc´s no matter it´s configuration, you really should get yourself familiar with delta time, or timebased movement. There are several threads about it here on PGD, including code samples. In short it means that your sprites don´t move with a certain pixels per frame, but rather with a certain pixels per timeunit.

  3. #3

    Fps management

    Hello Wizard.

    This is a must topic for you:

    http://www.gamedev.net/reference/art...rticle1604.asp

    If you still have some questions, feel free to ask

  4. #4

    Fps management

    Thanks Traveler & Wodzu. I value your input :-)
    Wake up from the dream and live your life to the full

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •