1
\$\begingroup\$

I'm planning to get into Unity 2D tools - so in order to start off I decided to create a little breakout clone. However, I'm not sure how to manage levels. When I wrote Breakout using MonoGame, I just had one class Level which read a XML-file for the level itself (kind of a simple tilemap).

Now that Unity has a graphical interface I could probably just create one scene for each level and put all the blocks in there. Is this a normal approach to handle levels in Unity - or would it be more appropriate to have one scene that also loads objects by using something like a XML file?

Thanks!

\$\endgroup\$
4
  • \$\begingroup\$ You can still do the same in one scene, you just need to manage how you clear the stages and create new layouts in it. \$\endgroup\$ Commented Mar 2, 2014 at 20:47
  • \$\begingroup\$ 1 scene = 1 level... Simple :) \$\endgroup\$ Commented Mar 2, 2014 at 21:10
  • 3
    \$\begingroup\$ @savlon for a game like breakout 1 scene per layout would be redundant. You can simply remove your objects and create a new layout by reading the xml file. \$\endgroup\$ Commented Mar 2, 2014 at 21:14
  • 2
    \$\begingroup\$ @Sidar On the other hand though, building one scene per level for a simple game like Breakout might be a good introduction to how unity works. \$\endgroup\$ Commented Mar 3, 2014 at 0:27

1 Answer 1

4
\$\begingroup\$

Technically you could do a new scene for each level, but I highly recommend the other approach of one scene that simply places objects based on data in an XML file. Separate scenes in Unity are intended for loading/unloading graphics and code when each level is significantly different, but if each level is pretty much the same objects just with the objects in different positions (like, say, a level in Breakout) then using separate scenes is rather inefficient.

\$\endgroup\$

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.