Re: [pygame] p4a animation lag

2012-01-13 Thread Sean Wolfe
On Fri, Dec 30, 2011 at 6:09 PM, Sean Wolfe ether@gmail.com wrote: Good info, I'll move the clock tick to the main loop and see what that gets me. Thanks for the tip. Hey guys, just wanted to check in with my p4a work. So after a few weeks mucking about with Java I went back to my phone and

Re: [pygame] p4a animation lag

2011-12-30 Thread Sean Wolfe
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,

Re: [pygame] p4a animation lag

2011-12-30 Thread René Dudfield
Hi, Do you need to blit the background each time? Have you used convert() on the surfaces? cheers, On Fri, Dec 30, 2011 at 5:00 PM, Sean Wolfe ether@gmail.com wrote: Don't have to click for every frame, it will run the whole list of frames on a single mousebuttondown. And the blit of

Re: [pygame] p4a animation lag

2011-12-30 Thread Sean Wolfe
I have *not* converted the surfaces ... I will try that! I'm blitting the background to basically clear the screen for the next frame. Is there a better way to do this? Thanks for the pointer... On Fri, Dec 30, 2011 at 1:05 PM, René Dudfield ren...@gmail.com wrote: Hi, Do you need to blit

Re: [pygame] p4a animation lag

2011-12-30 Thread René Dudfield
Hi, after you convert(), it should definitely be much faster. If you don't change the whole background, it might be good just to redraw the part you are changing. It can be easy to use the sprite.DirtySprite and sprite.LayeredDirty for this. Or if your other images are completely over writing

Re: [pygame] p4a animation lag

2011-12-30 Thread Sean Wolfe
sweet, this is a lot of good information. I've incorporated the convert bit and I'm pushing to the phone now to see. I'll look at the other pieces as well. The good news is the music is working well on android, I've got a background music track playing along with individual sounds for my

Re: [pygame] p4a animation lag

2011-12-30 Thread Ian Mallett
On Fri, Dec 30, 2011 at 8:00 AM, Sean Wolfe ether@gmail.com wrote: Don't have to click for every frame, it will run the whole list of frames on a single mousebuttondown. That wasn't really my point; graphics is only being drawn when the user clicks. Generally input and graphics are

Re: [pygame] p4a animation lag

2011-12-30 Thread Sean Wolfe
Good info, I'll move the clock tick to the main loop and see what that gets me. Thanks for the tip. On Fri, Dec 30, 2011 at 5:46 PM, Ian Mallett geometr...@gmail.com wrote: On Fri, Dec 30, 2011 at 8:00 AM, Sean Wolfe ether@gmail.com wrote: Don't have to click for every frame, it will run

[pygame] p4a animation lag

2011-12-29 Thread Sean Wolfe
I've got a pretty simple animation running on p4android, but it's lagging pretty badly. The code is basically, get a screen touch, run 3 animation frames with a tick of 10, so it should be pretty snappy. On the computer it's fast enough but the android it's noticeably slower, to the point where

Re: [pygame] p4a animation lag

2011-12-29 Thread Ian Mallett
On Thu, Dec 29, 2011 at 1:52 PM, Sean Wolfe ether@gmail.com 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: