Level set up/layout

I am hoping to make a game like bubble bobble. Each level is one screen. Would it be better to make a scene for each level/screen or would it be better to make multiple screens in one scene and just move the camera between the screens as you progress through the levels? What might be the pros and cons of each approach. Thank you for your time.

I would just make a single scene and then load each level onto that scene when needed. The most efficient way would be to save the data in arrays so you can just create the objects you need based on the array, although this might be a little dauting if you are just starting out

2 Likes

IF you will make all levels in 1 scene you face 2 issues
1 - your editor will lag
2 - your game will lag cause as you check if ball is in collision with ball you are checking it for ALL balls in scene
Then if you even restrict it by something like IS ON SCREEN
Then you are still checking if all balls are on screen or not

Half baked solution would be to have all levels in one scene and snap to whichever level you need when you need and delete rest
That would solve in game lag
Cause you reset scene so all levels are there then snap to one you need
And delete rest so lag is gone
BUT you did not fix issue of them lagging your scene editor

So best solution would be to use external layouts
Cause now you can side load them when you need them
And your scene editor won’t lag

I remade Battle City (old nes game) and i went with half baked approach of having all levels in one scene one under another
I snap camera to whichever level i need and delete rest
Reset scene after each level and this way i avoided in game lag
BUT even moving camera in scene editor was like dragging it under water like 10 fps at best

Where arrays are not good option
Cause now you cut out yourself from easy editing each level whenever you need
Most sense here have external layouts

2 Likes

It doesn’t make sense to load each level dynamically if performance isn’t a concern. If each level will be static, build each one in a separate scene and load them separately. The difference for the player will be irrelevant, but the headache you’ll have building a logic just to assemble and load each layout dynamically isn’t worth it. Make your life easier.

1 Like

I reckon 1 scene and external layouts (like zero says) that are named with a number and then you can created objects from ‘current level’ at the beginning of the scene. I have done it like magic sofa says but i had a level editor scene and i would use that to create levels - but itll be more of a headache than loading external layouts

1 Like