[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] frame independant movement



On Fri, Aug 27, 2010 at 10:59:09AM -0400, Kris Schnee wrote:
> On 2010.8.27 10:36 AM, B W wrote:
>> Howdy,
>>
>> Reviving this old thread. The comments by Patrick and Brian really
>> intrigued me, so I pursued the topic. Found a few interesting articles
>> and one great article. My study has resulted in a recipe for those of us
>> continually nagged by the question, "how can I get constant game speed
>> independent of frame rate?". The demo requires Pygame, but the clock
>> module only requires Python.
>
> Isn't it simply a matter of creating a Pygame Clock object and calling  
> clock.tick() to delay until the appropriate time to maintain some max  
> framerate?

That only caps a max framerate. What Gumm is talking about is when your 
framerate and your game simulation rate can be adjusted independantly

---
James Paige