[pygame] Slow rendering speed - sprites

2015-03-07 Thread David Unric
Hello, I'm considering a game framework for next more serious project. As I'm Python/Ruby language agnostic, I did rewrote simple sprite benchmark from Gosu to latest Pygame to do a performance comparison. You may find the code bellow. I was very surprised Pygame version performs much more worse.

Re: [pygame] Slow rendering speed - sprites

2015-03-07 Thread bw
Hi, See the attached for some tweaks. I bumped the number of sprites up to 200. When I used my own 100x100-pixels png that has an alpha layer I get a bit more than 100 fps. Alpha layers take extra CPU to render. When I use same-size filled rects of the same dimensions I get a little over 20

Re: [pygame] Slow rendering speed - sprites

2015-03-07 Thread David Unric
Much better, thanks. The only a bit serious impact on performance is the Surface.convert method on loaded image here. Good point. Sprite image is of 310x360 px dimensions and with alpha layer. With 200 sprites optimized with .convert_alpha I get about 19 fps, with plain .convert it raises upto 67