Re: [pygame] dmg files vs .zip files on OSX?

2011-12-29 Thread James Paige
On Thu, Dec 29, 2011 at 08:34:33AM +0100, René Dudfield wrote:
Hi,
 
it seemed pip used to mistake all .zip files for being source packages,
and got confused by our .mpkg.zip binaries for OSX.  That has been patched
in pip now, but it might take another 5 or so years before everyone
upgrades...  So, I need to know if .dmg files for OSX are ok?  I seem to
recall some reason why .zip were preferred over .dmg files... but I can
not remember the reason!  I think .dmg files are ok now, since major
projects like VLC etc all use .dmg files.  So maybe the reason does not
exist anymore with modern OSX. I plan on creating new .dmg files from the
existing .zip files, and linking to them from the download page.
 
tldr;
Are .dmg files ok for binaries on OSX now?
 
cheers,

Somebody can correct me if I am wrong, but I think the problem with an 
unzipped .dmg file was that there was no cross-platform tool for 
creating a compressed .dmg file, so if you wanted tocreate a compressed 
.dmg and you didn't have a Mac, you couldn't. A uncompressed 
unencrypted .dmg file is just a disk image in HFS+ format, but the 
compression and encryption are special somehow.

---
James Paige


[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
really the game would be unplayable. chug-chug-chug go the frames,
basically.

This is a Sprint Hero with android 2.1 or 2.2, can't remember exactly.
Am I just running into limitations on the platform? Any optimization I
can do for the android side?

If you want the code I can dig it up but it's just a simple animation
loop along the lines of

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)





-- 
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


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:
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