GMS 2 Isometric level editor[SOLVED]

Discussion in 'Programming' started by JDizzle383, Apr 30, 2018.

  1. JDizzle383

    JDizzle383 Member

    Joined:
    Jul 4, 2016
    Posts:
    31
    So I have been trying to figure out a method of creating a "depth detection" system for a level editor.

    What I mean is I need something like this:

    [​IMG] [​IMG]
    from these images:
    [​IMG] [​IMG]

    As it is my first time with isometric tiles and I don't know how to deal with depth based on what already exists in the level editor, if that makes sense, the problem I am having is the small base of the sprites(the bottom sides) are not going behind/in front correctly due to the layers... if they are on the same layer, they only function one way, but having a bunch of layers for each x and y position seems like the long and unwanted way to do it.
     
  2. maratae

    maratae Member

    Joined:
    Mar 14, 2017
    Posts:
    405
    You don't need to use layers. Isometric stuff usually goes something like depth = -y
     
  3. JDizzle383

    JDizzle383 Member

    Joined:
    Jul 4, 2016
    Posts:
    31
    Thanks! I knew I was doing something wrong.that works perfectly!
     
    maratae likes this.
  4. CMAllen

    CMAllen Member

    Joined:
    Mar 2, 2017
    Posts:
    855
    While it works, keep in mind that it is far from optimal, because you're creating additional layers at all those depths, and layers have their own overhead associated with them. The solution recommended by the GMS team is to use ds_lists to sort your drawing requests in the proper order.

    A post to refer to on the matter:
    Depth Ordering in GMS2: Priority List, Nested List-Grid, Binary List
     
    maratae likes this.

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice