Closed TheNeikos closed 4 years ago
The current way to do that is to create a separate AutoLayer
(a pure one, not an IntGrid
) that uses the IntGrid where collisions are. This separate layer can hold any "front" object easily.
Then, in your game, just render the layer above player.
There is a demo of this in the Typical 2d platformer sample:
bg_textures
uses collisions
as source for its data.
Ah! That works like a charm! I guess that covers my use case then. I didn't know you could apply autolayers from other intlayers. Thanks!
I'm using the autolayer feature to create 'grass decorations': , and I'd like to render them above the player. But since they share the same tileid as the actual 'solid' grass I cannot differentiate between them. I could see multiple ways this might be helped:
I'd also be willing to help implement this if you accept pull-requests!