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

Re: [pygame] How to make a (fast) smooth movement on 30 frames



On Thursday 22 June 2006 18:29, Sami Hangaslammi wrote:
> On 6/22/06, Kai Kuehne <kai.kuehne@xxxxxxxxx> wrote:
> > Thanks for the explanation.
> > I'm just wondering *what* causes the nearly 100% cpu time.
> > Currently, there's only the player-ship and one enemy on the screen.
> > And they don't move. ;-)
>
> Even if you only have two static sprites, I'm presuming you are
> re-painting the whole screen. For software surfaces, this is done
> entirely by the CPU.

Also, and this is an FAQ I guess, if you're asking clock.tick() for a frame 
rate of > 40 or so then tick() will busy-loop to get the timing right.


    Richard