Hello, still continuing optimizing my old-fashioned 2D RPG Engine, I'm facing a behaviour I didn't expect.
I have my map displayed, made of 10 layers, each layer made of sprites, scrolling smoothly. Then, I stop the scrolling, I draw a window (a box containing text), itself made of sprites, I wait some seconds and I close the window, deleting all the sprites which made it. Then I make the map scroll again. But now, for some unknown reason, the scrolling is not smooth (my fps seems divided by 2). I tried some experiments : 1) the map and the window share the same batch, each layer go to an OrderedGroup (index 0 to 9), and the window + text go to 2 others OrderedGroups (index 2000 and 2001) : the results are as described above 2) same thing but no group is affected to window + text : of course, in this case the display is wrong (some map layers appear above window) but when the scroll starts again, ot's as smooth as it was before. 3) one batch for the map and one for window : yet to test (but it's clearly not advised by official documentation) I don't understand why 2) is smoother than 1). First, it would mean that the OrderedGroups #2000 and 2001 are slowing down at a time they should have been deleted (when the map scrolls again, the window was deleted, and no sprite remains in the OrderedGroups 2000 and 2001). Thanks to anyone who can explain and help me doing this the most efficient way -- 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.
