Rendering Sprites Between TiledMap Layers

Hello,

Currently in my little project I’m trying to solve the problem of how to make it look as though my player is behind something, such as a tree or wall. To solve this problem, I’d ideally need to know how to render individual layers from my .TMX file, and in between two such layers, draw my sprite to the screen. I’ve done my best to research this on my own, and found this, but after reading through I had trouble understanding what the solution was.

Can someone point me in the direction of how to correctly achieve this?

Thank you!
-Ben

It just so happens that @LithiumToast is already working on a solution to this.

He should be done with it soon but if you’re interested you might want to take a look at his fork.

If you want to talk to someone directly, there’s often people hanging out in the gitter chat room.

Cool! Well I definitely have more to work on in the mean time, so I’ll hang tight and keep an eye on progress. Thanks for your hard work on this awesome library.

I added the support for this in #331. Should be available to use no later then this upcoming weekend, probably sooner.

Added support for drawing layers of a Tiled map seperately in TiledMapRenderer. Also allows to draw a layer at a certain Z depth.IsVisible and Opacity can also be changed at runtime for a TiledMapLayer and be reflected correctly when rendering.

Awesome! Simplifies 2 of the bigger challenges I have ahead of me. Thanks for your work!