Jump to content

Collapsing Tilemap Layers with Masking, Best Practice?


Recommended Posts

I have a Tilemap with 4 layers.  I need to render the layers like this:


- draw layer 1

- use layer 2 as a mask for layer 3

- draw the masked layer 3

- draw game sprites

- draw layer 4


I do not want the overhead of pushing 4 layers for every frame.  Is there an easy way to collapse and pre-render layers 1, 2, 3 so that at run time only two layers need to be drawn?


My current thinking is to write a tool that bakes layers 1, 2, 3 together into a new, procedurally generated tileset and tilemap pair for the game.  Of course, I would prefer an easier approach if one exists.



Link to comment
Share on other sites


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...