Why use multiple Scenes instead of multiple Canvas objects?

Hi,

Those are very good questions.

When starting a new scene, all non-persistent game objects get destroyed. In some games, that’s exactly what we want. It is also an easy way to restart a level with all enemies in it that the player killed before he died.

In little games like ours, it does not make much sense to develop a complex solution for reusing all these things because the impact on the performance would be unnoticeable. Time is crucial because if we work on our game too long, it might be that the technology will be outdated once we completed the project. We don’t want to waste our time with micro-optimisation nobody will ever notice. Our little game is “nothing” for our modern, powerful devices.

The Quiz Master game has got a few elements, and that’s it. If we reloaded the level, we would have make some elements persistent, for example, the score. This probably requires as much code as simply resetting a few variables. Both approaches are equally valid.

As usual, almost everything depends on the context.


See also: