On Tue, Feb 8, 2011 at 10:54 AM, Aaron <[email protected]> wrote:
> I've having speed trouble in rendering Sprites.
>
> I've been able to put everything inside a single Batch, but if I add
> too many animated Sprites my game starts slowing down. I think I've
> found a limit of about 75 animated Sprites at once on the screen,
> which for various reasons I need to go over.

Are all the sprites being updated every frame? Even if they are 75 is
very low. What hardware are you running on? What GL driver are you
using? Even Mesa shouldn't suck that much (in fact for 2d sprites Mesa
is quite well-optimised).

If you have the pyglet source, please try running
contrib/spryte/los.py and tell me what FPS you get for 100 sprites. On
my MacBook I get:

$ python los.py 100
best FPS: 447.955997975
best us per sprite: 22.3236211709
avg  us per sprite: 25.2170330363
$ python los.py 1000
best FPS: 50.1406737446
best us per sprite: 19.9438883708
avg  us per sprite: 21.4141262726


> Any suggestions for optimizations I can do short of working with raw
> OpenGL or pushing it off to a C package?

You might consider using rabbyt rather than implementing your own.


     Richard

-- 
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en.

Reply via email to