Terrains are fine, If the map is fixed then we can easily define how inter layer boundaries look like. For eg: you have Plains and Water in order to put a texture in your TMX Map, you’ll defined how Plain-Water Interaction look like?

Like this Image:

But what if you have 10 layers in ScaledJS you simply can’t put 10! (10 factorial) amount of combinations of mix and match.

So in ScaledJS we give (Terrain-Empty Interaction

image

As you can see in the above Texture Map, I have Plain-Empty Interactions. Of course, Water being the default layer I need only 1 tile since it will always be the base layer.

This way we can go flexible and have lots of layers and let ScaledJS do the mumbo jumbo for us. 

All we need to do is give the right texture in the right place.