I create each sprite individually, using the batch=my_batch argument of Sprite.
then, in @win.event def on_draw(): I draw the batch I do not remove or delete any sprite. But I swap their visible property (True/Flase) On Mar 23, 3:40 pm, Mikael Lind <[email protected]> wrote: > On 23 March 2010 14:54, Philippe <[email protected]> wrote: > > > i was really under that. let's say 50 srpites... > > It's hard to give a test case now, it's really embed in a bigger > > projet. > > > sounds like the problem comes from something else. strange that I > > could solve it, adding a new batch. > > How are you using the batch? Did you create 50 sprites at a single > time, then draw them each frame with the batch? Or are you > continuously adding and removing sprites to the game? In the latter > case, I believe you need to call sprite.delete() to clean things up > when you remove it. Either way, I don't think adding a new batch would > be the proper solution. > > Mikael Lindhttp://elemel.se/ -- 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.
