Reputation: 379
I have a procedurally generated game using tilemaps for easier generation and pathfinding, and I need to be able to have musltiple layers for things like seperate depths for different groups of objects, but the room data is specified at the creation of the map, not at the creation of the layer, unless something like tiled is used, which I can't use due to the fact that my game will be procedurally generated. I could go through the array and place individual tiles with a loop, but is there any other solution that I'm missing? Thanks!
Upvotes: 1
Views: 329
Reputation: 14695
You could do the something I mentioned in this answer, basicly, creating two maps with the same dimensions, set the z-order with setDepth
, and if the map above has transparent tiles, or tiles with the ID -1
, the map below should be visible.
I personally never used it for larger maps, but I assume it should not cause performance issue, and is an easy solution.
Upvotes: 1