[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] p4a animation lag
Don't have to click for every frame, it will run the whole list of
frames on a single mousebuttondown.
And the blit of the background takes care of drawing on top of one another.
Anybody have any ideas about the lag though? Maybe we need a p4a port
to the Android native kit.
On Thu, Dec 29, 2011 at 6:59 PM, Ian Mallett <geometrian@xxxxxxxxx> wrote:
> On Thu, Dec 29, 2011 at 1:52 PM, Sean Wolfe <ether.joe@xxxxxxxxx> wrote:
>>
>> frames = [image1, image2, image3]
>> running = True
>> while running:
>> for event in pygame.event.get():
>> if event.type == MOUSEBUTTONDOWN:
>> clock.tick(10)
>> for img in frames:
>> screen.blit(background, (0,0))
>> screen.blit(img, position)
>> pygame.display.flip()
>> clock.tick(10)
>
> You do realize that you're only ever drawing when the mouse is pressed,
> right? So, you'll have to click for every frame.
>
> Also, you're drawing every frame in the animation on top of each other.
>
> Ian
--
A musician must make music, an artist must paint, a poet must write,
if he is to be ultimately at peace with himself.
- Abraham Maslow