Smooth update "skipping"
I sometimes see the usual smooth update "skip" or "judder" for no apparent reason. There could be less rendering / processing going on and still it happens.
I am using flip and wait for vblank and the framerate dips to 40 or so, then returns to 60.
Is it a good idea to grab all the available cpu etc to the program?
My game update loop usually looks something like this
Note that I do nto use a timer. No commercial games use a timer for their main loop. They all basically do what I described above (with possibly some more code for maintaining a capped framerate or performing updates at a constant rate while allowing more draws, etc).
procedure TForm1.ApplicationIdle(Sender: TObject; var Done: Boolean);begin Done := False; Update(); Render();end;
Note that I do nto use a timer. No commercial games use a timer for their main loop. They all basically do what I described above (with possibly some more code for maintaining a capped framerate or performing updates at a constant rate while allowing more draws, etc).
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement