Hello, I'm using pyglet to make an old-fashioned 2D RPG engine. A map is made of layers (up to 10), each layer is made of tiles (21 * 15 tiles). A map can be big (more than 100 x 100 tiles), and sometimes infinite (toric).
The map is rendered in a single batch, each layer is attached to an OrderedGroup. A tile from a layer is attached to a sprite (in 'static' mode), but I keep only tiles that are effectively on screen (in a list). When a tile goes outside the screen, the sprite is destroyed (it's removed from the list so I suppose it's destroyed since there are no references on it anymore), and to the contrary, when a new tile comes inside the screen, I add a new sprite to the group. I've read they are slow operations, but I don't see a better way (the maps are too big to keep all the sprites). My problem is that I have performances issues for the biggest maps : I reach at most 5 fps, where I'd like to have 60. Event for smaller ones (only 3 layers), I get 30 - 40 fps. Am I doing it the wrong way (and if so, could you please point me better ideas) or is my goal clearly unreachable using Python + pyglet, and would require C++/OpenGL code ? Thanks in advance ! -- You received this message because you are subscribed to the Google Groups "pyglet-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/pyglet-users. For more options, visit https://groups.google.com/groups/opt_out.
