I was wondering if there are best/recommended practices on how to handle 
batches and scenes and levels.
More particularly, if I have a Game Scene, and the game has multiple 
different levels, the player can move between these levels,
what is a good way to implement this?
I can imagine a couple of options, but I don't know which is best:

1) The game scene has a batch, and when a level changes, the sprites of the 
old level are turned off (sprite.batch = None, sprite.visible = False or 
something else)
and the sprites of the new level are turned on (sprite.batch = 
current_level_batch, sprite.visible = True or something else).
If sprite batches are messed with, how does this work with Ordered Groups? 
Do you have to change them also?

2) Every level has its own batch. The Game Scene calls the draw function of 
the level batch.
When player changes levels, you need to change its batch (and Ordered 
Group?): player.batch = new_level_batch?

Those are the ones I could think of. Are there others that are better?
If some of these are bad practice, an explanation would be appreciated.

-- 
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 https://groups.google.com/group/pyglet-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to