Need help with ISO sorting (again..)

For questions about using Classic.

Post » Tue May 26, 2009 3:01 pm

Me again, I've made similar threads like this (and hijacked others :mrgreen: )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
[url:aqny3jt3]http://www.mediafire.com/?xyjvkxvtmo2[/url:aqny3jt3]

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.

thanks
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Wed May 27, 2009 4:46 am

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.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Wed May 27, 2009 5:48 am

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 :(
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Mon Jun 01, 2009 12:18 am

Sorry to shamelessly bump this up again, but I REALLY need some help with this problem :(
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Mon Jun 01, 2009 1:37 am

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.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Mon Jun 01, 2009 1:43 am

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! :D So many times I'd wake up in the middle of the night with a new idea and thought to myself, 'this HAS to work' only for it to fail ... :(

Anyways, everyone, download my link up top and mess around with the Z sorting formula and see if you can fix it! :D
B
3
S
2
G
5
Posts: 351
Reputation: 2,377

Post » Wed Jun 03, 2009 12:23 am

[quote="deadeye":1uq9vd0v]someone smarter than me[/quote:1uq9vd0v]
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.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Fri Jun 05, 2009 5:08 am

I'M PRETTY SURE I FINALLY SOLVED IT!!! :D

or at least come up with something that works ok.

edit: Upon further testing it would seem that I haven't solved it :( daaaaaam... close though :)
B
3
S
2
G
5
Posts: 351
Reputation: 2,377


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 2 guests