Results 1 to 3 of 3

Thread: Frame based or timed based for smooth scrolling?

  1. #1

    Frame based or timed based for smooth scrolling?

    I want to rewrite a tile scrolling game of mine, probably using Asphyre rather than DelphiX that I'm using at the moment.

    My problem is I've always written framebased movements, so regardless of the framerate on a particular machine my level and game scrolls at a particular speed.

    However everytime another Window process kicks in or does something in the background it slows the frame rate down and you get shuddering/jumping during the scrolling.

    How do you achieve super smooth scrolling on Windows machines?


  2. #2

    Re: Frame based or timed based for smooth scrolling?

    I'm using frame based with TTimer, with interval somewhere between 17-50. As long as render time stays under the tick time there shouldn't be lag with any timer unless the timer itself is bad built. If some insane cpu intensive process takes over for 2 seconds you need to execute all 2000 milliseconds worth of frames (or pause game when it goes inactive). QueryPerformanceCounter or GetTickCount help with those calculations.

  3. #3

    Re: Frame based or timed based for smooth scrolling?

    Fixed time step + interpolation is best. See this tutorial for a description.
    [size=10px]"In science one tries to tell people, in such a way as to be understood by everyone, something that no one ever knew before. But in poetry, it's the exact opposite." -- Paul Dirac[/size]

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
  •