Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

Scripting Level Design, non-tiled images to build it

Discussion in 'Scripting' started by sp00ks222, May 4, 2012.

  1. sp00ks222

    sp00ks222

    Joined:
    May 12, 2011
    Posts:
    37
    I am trying to create a non-tiled based level (i think) I want the end result to be something like this


    Pretty sure they are going about it the same was as Braid (if there is another way to do this, let me know) where they have multiple vector images and they place them to make it look like a structure/non-flat wall. Then place foreground items, like grass, flowers, etc.

    Assuming I go this route, I want to be able to load my game from a text file, most likely xml/json. My plan is to have a class that has all my prefabs installed, and then read the text file, and place the items in the position in the text file.

    for example: "wall1":{"x":20,"y":80}

    Eventually I want to make an in game editor (once I get non-tiled working okay for me)

    My questions are,
    1. Is there a better way of doing this?
    2. I want the file size to be low, so reusing art pieces will be key, will my initialization of the prefabs at the start help
    this?
    3. Has anyone done anything similar/have any advice/tutorials?
    4. How would you do this?

    Thank you so much!
     
  2. wccrawford

    wccrawford

    Joined:
    Sep 30, 2011
    Posts:
    2,039
    I don't see why this wouldn't be okay. Personally, I'd create the colliders for the level, and then spruce them up with the art. Likewise for level creation in-game. Your json file stuff will probably be fine.

    I don't think prefabs will save filesize at all. At least, not enough to matter. Efficiently creating and reusing your art is going to go a lot further for that.
     
  3. sp00ks222

    sp00ks222

    Joined:
    May 12, 2011
    Posts:
    37
    Thanks for the reply. When you talk about setting up the colliders for the level, do you mean multiple mesh colliders for the ground/wall/ceiling, and then you would place art assets slightly in the foreground of those colliders?

    Efficiently creating and reusing your art. Would Unity handle this if I was to make duplicates of one art asset?
     
    Last edited: May 7, 2012