In my game there are multiple levels (300 levels) You start a level by clicking on it in the level map (like the one in candy crush etc) The levels will be having the same gameplay, character and environment but the items (stored as scriptableobjects) available and the winning criteria will be different. Now I am confused about something. Is it recommended that each level should have its own scene and script?

  • \$\begingroup\$ There are very few rules that apply universally to every kind of game. Mostly it will depend on what your needs are for the specific game you're making. So, tell us a bit about your game and how you're approaching it, leading to this decision you're making. On the surface, it seems like not needing to manage an extra 300 scene files would be beneficial, but maybe you've identified an issue that makes it difficult for your levels to share a common scene? Tell us about that issue, and we can help you find solutions. \$\endgroup\$ – DMGregory Nov 11 '17 at 13:57
  • \$\begingroup\$ @DMGregory Yeah the player wins by doing something which is very different between each level For example in level 1 you have to draw a cat. In level 2 a dog. Just an example lol \$\endgroup\$ – user6918687 Nov 11 '17 at 14:41
  • \$\begingroup\$ So is your question really about scenes, or about how to manage victory conditions? I think we have some existing Q&A about that, which might be useful to search through for ideas. \$\endgroup\$ – DMGregory Nov 11 '17 at 14:48
  • \$\begingroup\$ It is not about managing victory conditions. Just whether i should use multi scenes or single scene \$\endgroup\$ – user6918687 Nov 11 '17 at 15:05
  • \$\begingroup\$ If you are procedurally generating each level(like the ones in cc ect..) Once you click the level on the map the ui animates or fades out and the gameplay level fades in and generates in a single scene. Really depends on if you generate the level or have hand made preset levels. \$\endgroup\$ – Justin Markwell Nov 11 '17 at 16:37

Usually using only one scene for multiple levels is (almost) never a good choice, unless the game is VERY small(or if you want to generate the levels procedurally) If you are planning to do multiple levels in your game, i would go for a multi-scene approach, to have a better, more organised workflow. At the end of the day it really depends on the type of game you are making.

  • \$\begingroup\$ Would that increase the size of apk if I use many scenes? \$\endgroup\$ – user6918687 Nov 11 '17 at 16:10
  • \$\begingroup\$ Yes but only if you use really many, many scenes. It is not going to increment the size of the apk too much. Again, it is raccomended to use multiple scenes, for the levels in your game. The final size of the apk also depends on the "size" of the scenes themselves. If a scene just contains a cube it is going to weigh a lot less than one which contains 300 cubes \$\endgroup\$ – user100681 Nov 11 '17 at 16:14
  • \$\begingroup\$ I am also worried about lighting. Can I just use the same lighting for all the scenes? \$\endgroup\$ – user6918687 Nov 11 '17 at 17:35
  • \$\begingroup\$ Yes of course you can, you have to make sure to rebake the lighting when you load the scene. It should be done automatically by unity under Window->lighting though. \$\endgroup\$ – user100681 Nov 11 '17 at 18:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.