Need help with ISO sorting (again..)

This forum is currently in read-only mode.
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Me again, I've made similar threads like this (and hijacked others )before and since I have made a fair bit of changes to my old model, i decided not to necro one of the old threads..

    Basically, I need help fixing the sprite Z order sorting in my ISO engine. I've tried so much stuff i can't even remember it all.

    here's a link to the current version

    As you can see, it's still not perfect. There seems to be some physics problem with disabling collisions while still trying to move but that's minor, the main problem is the Z sorting, once that's done i can start crankin out some content.

    ALL i need to get it to work, is some formula (preferably in the format of the 'for each ordered' loop) that will make the affect objects behave thusly:

    • If their Y coordinate (regardless of their height) is greater than another affected object, it will always be in front of it (i have this one solved of course)
    • If the bottom height variable (distance from the ground) of one object is greater than the top height of another affected object, it will always be in front of it (currently cannot achieve this)

    The current ineffective formula is this:

    for each Layers (family) ordered by:

    (Layers.Y + Layers.Value('ZHeightBottom')) + Layers.Value('ZHeightBottom')

    = send to front

    Ordering by the Layers.Y + Layers.Value('ZHeightBottom') solves my first problem and adds simple iso depth to the game. But it treats everything as though they are infinitely long 'poles' sticking out of the ground, sure you can go around it but you sure as hell can't sit on top of it.

    The REAL hard part is getting the player (and anything else in the layers group) to sit on top of stuff without any errors.

    Please help I know it's tricky to explain, just play the game and you'll catch my drift.


  • I was looking into this too.

    I used a proxy object for collisions (a "shadow") which worked perfectly at first. That, however, gave me trouble with picking, as I had too many indirections and it became ambiguous when there was more than one height and object type.

    I'll try again and post during the weekend, as there's no time now for more than a peek at the forums.

    I've been considering a new plugin for this kind of 2.5d behavior. You know, standing on top of things, hiding behind, etc.

  • Yeah i used the same method, if you hold C in my current engine it goes into a sort of 'debug' mode where you can see all the invisibles

    I was hoping that new 3d layering thing might have worked in this but alas, perspective

  • Sorry to shamelessly bump this up again, but I REALLY need some help with this problem

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Normally I would jump in and help, but I've been down this road before. I remember the sheer frustration I had last time I tried to tackle this.

    All I can do at this point is say "good luck." Hopefully someone smarter than me can help you out. This sort of thing is just out of my league.

  • Thanks for before I don't expect you to go nuts on it lol

    It IS bloody hard, I just figured now we have a bunch more people on construct, there might be someone with some more insight into this sort of thing.

    Terribly frustrating i know!

    Anyways, everyone, download my link up top and mess around with the Z sorting formula and see if you can fix it!

  • someone smarter than me

    Goddamnit we're screwed!

    I want to code a 2.5D platformer behavior, but Uni is consuming me whole these days.

    I will do it if no one beats me to it though. Don't wait up.


    or at least come up with something that works ok.

    edit: Upon further testing it would seem that I haven't solved it

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)