Any problems with having a lot of scenes?

Hi,


I'm making a kids game that is basically an ongoing series of mini games - match a shape, small jigsaw puzzle, etc


Typically, I think this would be done by having a MiniGame class as a subclass of sknode. Then add and remove MiniGames from a GameScene.


However, I think the transitions provided by SKTransition work really well in this case. I'm thinking of having each mini game as it's own scene and whenever one is finished, presenting another.


Each mini game would only have a few sprite nodes and some particles and would likely only take seconds to complete.


Are there any performance costs or other issues that mean I shouldn't be switching scenes so frequently?

Accepted Reply

Use separate scenes. Much easier to organize and of course you get the benefit of setting them up with the Scene Editor. Switching them frequently (or not) isn’t going to cause any issues. When the outgoing Scene is gone, it’ll be cleared out on its own. You could of course manually clear all children in the Scene prior to the transition but you shouldn’t really need to.

Replies

Use separate scenes. Much easier to organize and of course you get the benefit of setting them up with the Scene Editor. Switching them frequently (or not) isn’t going to cause any issues. When the outgoing Scene is gone, it’ll be cleared out on its own. You could of course manually clear all children in the Scene prior to the transition but you shouldn’t really need to.