How do I make a proper Y(Z)-sorting?

Get help using Construct 2

Post » Sat Mar 21, 2015 3:40 pm

Greetings!

Despite the fact i'm quite old C2 user, i still have a problem with Y-sorting and i'm really successfully procrastinate this problem.

The game looks like a field of hexagons (each one is some terrain) of two principally different types: forest and not forest. :)
Forest-type tiles have Z-order like this:
Image

Not-forest-type tiles have Z-order like this:
Image

Myobjective is is to create a function (or any other solution) to avoid graphical issues like this:
Image
Image

At the moment i have a checkout on player figure hits the target tile, but it have issues that are not funny anymore.

I will be very glad to see any suggestions and ideas, everyone is welcome.

P.S. Game board is made with Rex's rex_board plugin.
B
8
S
2
Posts: 56
Reputation: 1,021

Post » Sat Mar 21, 2015 4:37 pm

My suggestions are:
1. For the little bushes, use a separated layer which is below the characters.
2. For forest and character sorting, group them as a family and use <For each (ordered)> and set expression to Family.Y + ascending, in the event set family object to top of layer.
Providence University, lecturer.

Tatung University, lecturer.



Consultant per question: USD$15 / time

Consultant by month: USD$300 / month

Customized project: USD$2500 / capx
B
72
S
16
G
4
Posts: 189
Reputation: 7,494

Post » Sat Mar 21, 2015 5:27 pm

Rex has a Y-Z sorting plugin that just grabs everything on the layer. I dunno if it's more efficient than the FamilySort, but I hope so if you have lots of sprites.
B
14
S
5
G
1
Posts: 189
Reputation: 1,536

Post » Sat Mar 21, 2015 7:36 pm

jomo wrote:My suggestions are:
1. For the little bushes, use a separated layer which is below the characters.
2. For forest and character sorting, group them as a family and use <For each (ordered)> and set expression to Family.Y + ascending, in the event set family object to top of layer.


That's what i've tied already. Idea for bushes - done, thanks a lot, i really needed a fresh look.

bladedpenguin wrote:Rex has a Y-Z sorting plugin that just grabs everything on the layer. I dunno if it's more efficient than the FamilySort, but I hope so if you have lots of sprites.


Wow, haven't seen it. Seems like this plugin does the same action jomo proposed, but i'll try. Thanks a lot. I'll post the result here.
B
8
S
2
Posts: 56
Reputation: 1,021


Return to How do I....?

Who is online

Users browsing this forum: ephrisian, Google [Bot], ismael123, Jhorbam and 10 guests