Page 2 of 2 FirstFirst 12
Results 11 to 12 of 12

Thread: time based movement and WinAPI + DirectX

  1. #11

    time based movement and WinAPI + DirectX

    what is better? DeltaTime(FrameTime) or timer with fixed interval?
    You could do that, but i do think it has any advantages. You are running away from the actual problem, instead of solving it (check my sig Very ). I think it is better to make a decision. Use time-based movement with OnIdle and DeltaTime or FrameTime, or use a timer with a fixed interval. I would choose the first one.

    It is little harder to implement, but it is rewarding in the end. Wink
    I think that frame-based movement is better than using a timer. For example when you are running the app on a realy slow PC, and you set your timer to 60 FPS, the PC might not handle that speed. The result is that your app runs slower than you want. This is not the case when using Frame-based movement.

    Offcourse, if you want to use a timer, i'm not gonna stop you. I only think that frame-based movement is more elegant.

    For a more detailed explanation about this technique: This thread

    Hope it helps.
    Coders rule nr 1: Face ur bugz.. dont cage them with code, kill'em with ur cursor.

  2. #12

    time based movement and WinAPI + DirectX

    Quote Originally Posted by chronozphere
    what is better? DeltaTime(FrameTime) or timer with fixed interval?
    You could do that, but i do think it has any advantages. You are running away from the actual problem, instead of solving it (check my sig Very ). I think it is better to make a decision. Use time-based movement with OnIdle and DeltaTime or FrameTime, or use a timer with a fixed interval. I would choose the first one.

    It is little harder to implement, but it is rewarding in the end. Wink
    I think that frame-based movement is better than using a timer. For example when you are running the app on a realy slow PC, and you set your timer to 60 FPS, the PC might not handle that speed. The result is that your app runs slower than you want. This is not the case when using Frame-based movement.

    Offcourse, if you want to use a timer, i'm not gonna stop you. I only think that frame-based movement is more elegant.

    For a more detailed explanation about this technique: This thread

    Hope it helps.
    A good timer will have same result on a slow pc
    From brazil (:

    Pascal pownz!

Page 2 of 2 FirstFirst 12

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
  •