Hello Guest

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - dsuse15

Pages: [1]
1
Support / Re: Tilemap draw order by y-axis
« on: June 10, 2013, 05:11:30 am »
I've got the tilemap setup so that x is to the right and y is up.  I have the map setup as a few different layers to help with z-order in relation to other tiles (base layer, overlay layer, objects layer, and an "always on-top" layer).  As the player is moving up on the y axis, he should be moving behind tiles that are lower on the y-axis.  There is also the issue with bridges: they are over the player even when the player's y-value is less; unless the player is on the bridge.  The player is an animated (2-tile high) sprite with a collider on his feet, by the way.

I changed the tilemap code to allow a y-partition size of 1, just to see what I could get going.  I also changed the z-"increase" per row from .000001 to something a bit more drastic so I could see the change.  This gave me a bit more control, but obviously at a huge slowdown.  I'm looking for a really clean way to do this and I know I'm really going in the wrong direction.  I was thinking of adding a field into the tilemap settings inspector for "tile row z-change".  In the code, regardless of what partition a tile is in I'll base that tile's z-position on it's row's y-position and change it by that inspector z-value (taking layer z into account also).  I'm not sure if this will give the results I'm looking for, but it's just an idea.

I'm making a 2D SNES-like rpg and I'm trying to find an all-encompassing solution that will work in a variety of situations.  For the most part, everything is perfect.  There are just a few instances where the player needs to be behind something.  I know this problem has been solved in the past hundreds of times.  I'm just trying to find a clean solution in the context of 2D Toolkit.  I really appreciate you consistent help on these forums...This has been money well-spent  ;)
 

2
Support / Re: Tilemap draw order by y-axis
« on: June 07, 2013, 10:01:06 pm »
Hmm...I'm actually having the same issue.  I have a top-down view and I'm having a difficult time getting the character's z-value to make sense within the map of tiles.  I think it's essentially the same issue andy was having.  I'm going to try to implement his solution in RenderMeshBuilder.BuildForChunk, so we'll see how that goes. 

I'm just wondering if you think we'll see any type of solution to this issue in a future release?  I feel like all top-down tile-based games will require this functionality at some point.  Would it make sense to have an option to make the tilemap's z values based on the tile's y value regardless of what chunk it's in, or is it more complicated than that?  Thanks for any help you can offer.  I'm really enjoying using 2D Toolkit.  It's dramatically improved my workflow   :D

Pages: [1]