User Tag List

Results 1 to 3 of 3

Thread: Isometric Platforming Layer Orders

  1. #1
    Clicker Fusion 2.5

    Join Date
    Sep 2006
    Posts
    280
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Isometric Platforming Layer Orders

    I saw an example of someone ordering objects in an isometric game very well. They used the Iso Grid 2 object, but the code for object order was super complex and used 3D arrays and the like.

    I'm wondering if there's a much simpler solution to making objects appear on top of or beneath other objects in an isometric design already coded for "Sort by Alterable Value decreasing." Of course, that works fine for everything being on the same plane, but if a player and/ or maby other objects would be above in "Z Axis" the height level of a prop like an active object resembling a crate, or standing on top of it, it'll show the object behind the prop when it's actually supposed to be on top of it.

    Moving objects to different layers came to mind, though it sounds like it would be difficult having so many layers representing so many different possible platform levels and heights.

  2. #2
    Clicker

    Fusion 2.5 DeveloperFusion 2.5+ DLCAndroid Export ModuleSWF Export Module
    Konidias's Avatar
    Join Date
    Aug 2009
    Posts
    1,546
    Mentioned
    3 Post(s)
    Tagged
    0 Thread(s)
    You create a "level" multiplier and then add that to your sort variable.

    Treat each step up in height as a level. So for example, if your next level up is the height of your crate, then that is level 1. The ground the crate is on would be level 0.

    Then you take your sort variable that is sorting the objects and you do this:

    sort variable + (level*highest sort variable plus one)

    You need to first figure out what the highest sort variable you can have on one level would be... Typically this will be the object in the bottom right corner. It's whatever object will draw over everything else on one level. This way when you do (level*highest sort variable plus one) It will add on that multiplier in order to draw the next level of stuff over the bottom level of stuff.

    So level 0 stuff will be drawn for example... on variable 0 - 1000

    0 to 1000+(0*multiplier) = 0 to 1000

    Level 1 stuff will be drawn based on your multiplier... so lets say multiplier = 1001

    0 to 1000+(1*1001) = 1001 to 2001

    Tada! All of level 1 objects will always draw over all of level 0 objects.

  3. #3
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleSWF Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)SWF Export Module (Steam)Firefly 3D Module (Steam)
    Disthron's Avatar
    Join Date
    Sep 2007
    Posts
    248
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Konidias View Post
    You create a "level" multiplier and then add that to your sort variable.

    Treat each step up in height as a level. So for example, if your next level up is the height of your crate, then that is level 1. The ground the crate is on would be level 0.

    Then you take your sort variable that is sorting the objects and you do this:

    sort variable + (level*highest sort variable plus one)

    You need to first figure out what the highest sort variable you can have on one level would be... Typically this will be the object in the bottom right corner. It's whatever object will draw over everything else on one level. This way when you do (level*highest sort variable plus one) It will add on that multiplier in order to draw the next level of stuff over the bottom level of stuff.

    So level 0 stuff will be drawn for example... on variable 0 - 1000

    0 to 1000+(0*multiplier) = 0 to 1000

    Level 1 stuff will be drawn based on your multiplier... so lets say multiplier = 1001

    0 to 1000+(1*1001) = 1001 to 2001

    Tada! All of level 1 objects will always draw over all of level 0 objects.
    Hi, I'm also trying to help Kid_Roleplay, but unfortunately I don't have any experience with iso stuff. Anyway after playing around with the code a bit it seems that the system you propose assumes that everything is 1 hight level tall, but what if something is 2 or 3 hight levels tall? We seem to be having a problem that things on a higher platform are still being drawn over the top of things that are on a lower platform, but are taller and thus should be overlapping regardless. Dose anyone know how to account for this, we would really appreciate it.

Similar Threads

  1. Help two objects orders
    By ASD in forum Multimedia Fusion 2 - Technical Support
    Replies: 2
    Last Post: 23rd November 2009, 01:47 PM
  2. UK Webshop Orders
    By JasonDarby in forum News
    Replies: 0
    Last Post: 8th January 2008, 08:14 AM
  3. possible to take values trough number orders?
    By integrality in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 18th April 2007, 01:32 PM
  4. Orders of Counters, other backdrops
    By BenMo in forum Multimedia Fusion 2 - Technical Support
    Replies: 4
    Last Post: 28th December 2006, 06:35 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •