I am back at this and experimenting with using sprites for each tile.

I am running some tests and have about 5k sprites on the screen. If
they are static, I am getting around 500 fps. If I run through a tight
loop and just increment their x coordinates, the fps drops down to
about 30.

If I take out the change of the x position but still run through the
loop each frame, the fps stays around 450-500.

I traced through the code a little and it seems as though changing the
position runs quite a bit of code.

I've tried Cython, C extensions, the code from "Make Me", etc. I can't
seem to get any better than 40ish fps at 1440x900 and 16x16 tiles.

The C++ library I am testing uses a sprite class that has all the
tiles in a single texture and you set the current frame then call
sprite.draw(x,y) 5,000 times, rather than using 5k sprites. Is there a
way to do something similar in pyglet?

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