Re: [pygame] Re: I can't install pygame on activestate python [win, 32bit python 2.7]

2011-04-12 Thread René Dudfield
Awesome. With your permission, I think I'll link to them from the pygame download page as pre releases? Or I can upload them to the pygame website to save you some bandwidth. cya. On Tue, Apr 5, 2011 at 6:27 PM, Lenard Lindstrom le...@telus.net wrote: New versions or Pygame 1.9.2 (rev 3070)

[pygame] blit a list containing surfaces

2011-04-12 Thread ANKUR AGGARWAL
I created a list which contains the subsurfaces of the sprite image. Now i want to blit it on the screen so that it seems to be like a animation. I tried but unable to do so. So kindly help me in the algo of how to blit this list (Images=[Surface(16x16x32 SW), Surface(16x16x32 SW),

Re: [pygame] blit a list containing surfaces

2011-04-12 Thread Ian Mallett
Make a counter and an Update function, then index into the list: counter = 0 ... def Update(): global counter counter = (counter+1)%6 def Draw(): #blit my_list[counter]

[pygame] Whoa! Bad slowdown!

2011-04-12 Thread Julian Marchant
I have actually mentioned this project of mine on this list before, but it was about a Windows-specific issue. This time, it's about slowdown. Now, my laptop is very low-end, so it's not surprising to me when I experience lag in particularly graphically-intensive games, but this is ridiculous.

[pygame] Making UPS smart with Pygame and Joystick input socket

2011-04-12 Thread SlawKo . skrzynka
Hello, I would like to get some information whether it would be possible to use Pygame's Joystick package to process simple signal from UPS to trigger clean shutdown of the Linux machine. I would like to use 2 buttons from Joystick interface to sense 3 states from UPS: A) AC power OK B) no AC

Re: [pygame] Making UPS smart with Pygame and Joystick input socket

2011-04-12 Thread James Paige
Are you sure your UPS device is actually being read as a Joystick? Exactly what kind of UPS do you have, and how is it connected to the computer? There are probably better tools for doing what you want to do than pygame. --- James Paige On Wed, Apr 13, 2011 at 12:42:18AM +0200,

Re: [pygame] Whoa! Bad slowdown!

2011-04-12 Thread James Paige
Use python's cProfile module to quickly pinpoint the slowest parts of your code. http://docs.python.org/library/profile.html --- James Paige On Tue, Apr 12, 2011 at 04:02:35PM -0700, Julian Marchant wrote: I have actually mentioned this project of mine on this list before, but it was

Re: [pygame] Whoa! Bad slowdown!

2011-04-12 Thread Ian Mallett
Well, for one thing, on my machine, it segfaults constantly. I tracked it down to ~line 1006: scaled = pygame.transform.smoothscale(img, size) But there doesn't seem to be anything out of the ordinary there. Maybe trying to resize many 1x1 surfaces to 400x400 leads to a memory leak somewhere in

Re: [pygame] Whoa! Bad slowdown!

2011-04-12 Thread Julian Marchant
I tried changing the default fill-in surface size from 1x1 to 200x200 and removing all the empty 1x1 images in data/characters/noghost, but it had no effect on speed. This error occurred, however, and it seems to be a result of removing the 1x1 images (which caused dynamically generated

Re: [pygame] Whoa! Bad slowdown!

2011-04-12 Thread Weeble
On Wed, Apr 13, 2011 at 1:49 AM, Julian Marchant onp...@yahoo.com wrote: Is there a better way to do what I'm trying to do in that section of code? Try something like this: img = self.images[self.leftarm_image][img_index].copy() img.fill((255,255,255,255*alpha_percent),