Create a "complex" tilemap from arrays

Hey,
I’m trying to create a simple 2D platformer with simple physic (Physic “arcade”), and I don’t wan’t to use Tiled Editor (a bit complex for what I want)
I would like to create a tilemap with 2 layers (from 2 arrays) and set the collisions with my player with 1 layer.

I expect something like:
I create the first layer, the background. This layer can’t interact with my player.
Then, I add a second layer, the ground. All the tiles in this layer collide with the player.

Thank you !

This platformer example uses arrays as a tilemap.

Check out levels.ts and map.ts in its repository to see how it works.

It uses only one layer though.

1 Like

Thank you for this rapid answer ! I will check this tonight to see if it can solve my problem :slight_smile: