[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] pygame.display.flip() and framerate
Ian Mallett wrote:
I was just wondering because, even though it is true, more than 61
frames can't be drawn in a second, SDL keeps the framerate higher, which
allows the game logic to run faster.
There's no reason your game logic has to run at the same
rate as your display rendering. You're at liberty to,
e.g., update your game logic twice per frame, giving
you 120Hz game logic with 60Hz frame rate. If your display
only runs at 60Hz anyway, this is more efficient than
running everything at 120Hz, since you're not wasting
time rendering frames that will never be seen.
--
Greg