Re: [pygame] Pygame2 SDL_mixer segmentation fault

2010-01-20 Thread Evan Kroske
On Tue, Jan 19, 2010 at 2:42 AM, Marcus von Appen m...@sysfault.org wrote: On, Mon Jan 18, 2010, Evan Kroske wrote: I'm running 64-bit Ubuntu Karmic Koala with Linux kernel version 2.6.31-17-generic, and I get a segmentation fault when I call pygame2.sdlmixer.init(). Has anybody else

[pygame] Rotation Performance

2010-01-20 Thread Bram Cymet
Hi All, I did some profiling of my pygame application and I found that it was spending a lot of time doing rotation operations. Basically I have some balls on the screen that are represented by gifs with transparent backgrounds and I want to make them spin. I use the following code: These

Re: [pygame] Rotation Performance

2010-01-20 Thread Shandy (Andy) Brown
Image processing commands are expensive. Best to precalculate all the rotations. Also, since it's probably regular CPython you're running, there's only ever one thread running at a time. If you're using threads, you're probably doing something wrong. On Wed, Jan 20, 2010 at 5:08 PM, Bram Cymet

Re: [pygame] Rotation Performance

2010-01-20 Thread Ian Mallett
On Wed, Jan 20, 2010 at 6:06 PM, Shandy (Andy) Brown sjbr...@geeky.netwrote: Image processing commands are expensive. Best to precalculate all the rotations. Indeed. Precalculate, cache, and generally avoid image processing in SDL.

Re: [pygame] Rotation Performance

2010-01-20 Thread Luke Paireepinart
Also, since it's probably regular CPython you're running, there's only ever one thread running at a time. If you're using threads, you're probably doing something wrong. I think what he means is that - don't assume that just because you have 2 threads they will run on both cores. What

Re: [pygame] Rotation Performance

2010-01-20 Thread Jake b
Hello. You don't need to worry about creating threads for this app. On Wed, Jan 20, 2010 at 7:08 PM, Bram Cymet bcy...@cbnco.com wrote: Hi All, I did some profiling of my pygame application and I found that it was spending a lot of time doing rotation operations. Basically I have some

Re: [pygame] Rotation Performance

2010-01-20 Thread Casey Duncan
Some thoughts: - You might try using rotozoom, which probably isn't faster, but will give you much better quality. - Don't rotate a single image/surface multiple times, as rotation is lossy, and will make the surface grow much larger than necessary. Instead only rotate from the original image

Re: [pygame] Rotation Performance

2010-01-20 Thread B W
It could just be the Atom. http://www.trustedreviews.com/cpu-memory/review/2008/08/14/VIA-Nano-vs-Intel-Atom/p3 Gumm