Backgrounds Scenes and Levels

I’ve been spending a lot of time working through tutorials for 2D games and I am planning to start my first game from scratch. My goal is to make a fairly simple 2D top down shooter similar to many of the 8-bit games from the NES. I’m not entirely clear on the best way to create various levels. My initial assumption was that each level as well as the opening main menu would be assigned to separate scenes. However I wonder if it would be simpler to just put everything in a single scene and simply move the player’s transform as necessary as they progress through the game. How taxing on the memory would it be to load basically an entire 2D game when the player starts the game? Is this a bad idea?

I honestly think it’s easier to create multiple scenes, at least for me this is a way to keep things organised. I guess this is a choice you’ll have to make for yourself depending on how big your game will be. If you load everything into memory at the beginning of the game you won’t have to load between levels, but of course this occupies more memory at once and may slow down performance depending on whats going on in the game. If your game isn’t that big you would probably be fine loading it all in at once, but you will have data in memory that you may never use, and that doesn’t really feel like healthy coding to me.

Some developers who are doing games for mobile go for the “everything in one scene” solution, since load times can be significant on such devices. As Hiinas writes, it will take more memory. Coded correctly it won’t slow down performance, but it is trickier to get it right.

Especially since you are a beginner, I think you should go with multiple scenes. It will be far easier to get things going. Since you can edit multiple scenes in Unity, it will be quite easy to put everything in one scene if you should opt for that at a later point (a much easier process than going from the “everything in one” to separate scenes).

I forgot to add: If you don’t want to impact performance too much and are doing an several scenes in one approach. Put each of the scenes into an empty GameObject. Set all of these as inactive until you need them, then activate the appropriate ones and deactivate all others. That way only the active part are being processed and the other ones shouldn’t impact on performance.

That is a good idea. Thanks for the input.