Hey!

I have a problem drawing terrain with pyglet. By terrain I mean just
tiles. I want to draw about 500 of them on the screen every frame.

The problem is I haven't found a good way to do it that is fast. If I
just blit every image where I want it, it takes about 1/20 of a
second.

If I convert the images to sprites and add them to a batch, it takes
about 1/2500 of a second to draw them. But when I put the images in
the batch I have to say where, in screen coordinates, I want the
images. So when I scroll across the terrain those same tiles have new
screen coordinates so I have to create a new batch, and with that I'm
down to 1/20 of a second again.

I suspect there is some way to get around this, so that I don't have
to create a new batch every frame. If it was a 3D engine I would just
have everything laid out and the engine would take care of drawing
everything based on the camera---I want something like that here too
if possible... or something.

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