I'm trying to draw an RPG tile map. So far I've been able to draw the whole map by creating a sprite for every tile, all associated with a batch. The images for the sprites come from an ImageGrid for the map's spritesheet. The map is created with Tiled (http://www.mapeditor.org/) you see.
Now I'm thinking about tile culling, since I'll only ever draw a subset of the map. Positioning the map can be done with a transformation (available only through the OpenGL interface I assume) so all that's left to determine is which tiles are visible. Having to repeatedly cull tile sprites before drawing means I can't use a single batch created at the start anymore. The solutions I've heard of are recreating the sprites and batches every time I need to draw, leaving out the hidden tiles, or ignoring sprites and batches and just blitting the images for each tile manually. I've also heard people talk about using textured quads with raw OpenGL instead of Pyglet's higher level objects and functions, but I have yet to wrap my head around that. I suppose it's worth asking if Pyglet has or is going to have any general abilities to do off-screen culling? -- 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.
