gl-tiled
gl-tiled copied to clipboard
Support for only drawing one layer at a time?
As with many other games, my player and other monster sprites are in the middle of the map layers. That is, the game rendering logic is something like this:
renderMap() {
drawMapLayer(0);
drawMapLayer(1);
drawMapLayer(2);
drawSprites();
drawMapLayer(3);
drawMapLayer(4);
drawMapLayer(5);
}
Is it possible to do something like this with your library? So that I can have parts of the map drawn over the player and other monsters.
It'd be more expensive than drawing all the layers at once, but shouldn't be too hard to break up the tilemap draw
function. PRs welcome.
Sure, I think I can figure it out. I just need to get the power-of-two issue fixed first, and then I can make a PR for this.