Search Unity

Best Way to Load Multiple Level Layouts on Similar Screens

Discussion in 'Scripting' started by redf150flames, Nov 24, 2017.

  1. redf150flames

    redf150flames

    Joined:
    Nov 12, 2017
    Posts:
    4
    I'm working on a game that consists of a game board, a player object, and pickup items which are laid out differently on each level.

    Wondering if its best to create a scene for each individual layout, or if its better to load one scene and then the layout based on which level the user chooses. For the latter, I need some direction on how to go about it.

    I'd like to have different textures used for the game board depending on the level if that affects your suggestions.

    For a better idea of what I'm doing, its based on the 2D UFO game tutorial by Unity
     
    Last edited: Nov 24, 2017
  2. Antony-Blackett

    Antony-Blackett

    Joined:
    Feb 15, 2011
    Posts:
    1,778
    It depends. If your boards are small and easy to understand in a simple file format like a csv, you could bypass unity for level building and just build them in something like excel, placing letters in cells. that'd be a lot faster to iterate and you would be able to iterate on levels without hitting stop and start on the editor. just save the level, reload and presto.

    As for swapping assets, I'd do this separately. Make a theme definition that defines all the textures or materials and models to use, then the game can load any level with any theme. this will allow you to rearrange levels and allow you to balance the flow and difficulty of your game really easily.

    These are fairly abstract suggestions though, it's hard to know if these ideas are relevant as I have so little information about your game.
     
    redf150flames likes this.
  3. redf150flames

    redf150flames

    Joined:
    Nov 12, 2017
    Posts:
    4
    I'm curious about the csv thing...the levels are super simple in my opinion. Its basically a 7x7 grid with sprites placed in the center of each grid spot to make a design. Any resources on where I can learn about going that route?

    And I'll look into the theme thing as well. Thanks!

    Its based on the UFO game tutorial offered on Unity to get an idea of what I'm doing.
     
  4. redf150flames

    redf150flames

    Joined:
    Nov 12, 2017
    Posts:
    4
    Is this the theme thing you were talking about?
    https://www.assetstore.unity3d.com/en/#!/content/84068