# Create a "complex" tilemap from arrays

**URL:** <https://phaser.discourse.group/t/create-a-complex-tilemap-from-arrays/2556>\
**Category:** Phaser 3\
**Created:** [May 24, 2019, 11:21am UTC](https://phaser.discourse.group/t/create-a-complex-tilemap-from-arrays/2556 "2019-05-24T11:21:44Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Eteckq](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/eteckq/32/1449_2.png) [@Eteckq](https://phaser.discourse.group/u/Eteckq)\
**Post date:** [May 24, 2019, 11:21am UTC](https://phaser.discourse.group/t/create-a-complex-tilemap-from-arrays/2556/1 "2019-05-24T11:21:44Z")

</div>

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 !

---

<div class="post-metadata">

**Author:** ![yannick](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/yannick/32/732_2.png) [@yannick](https://phaser.discourse.group/u/yannick)\
**Post date:** [May 24, 2019, 11:30am UTC](https://phaser.discourse.group/t/create-a-complex-tilemap-from-arrays/2556/2 "2019-05-24T11:30:48Z")

</div>

[This platformer example](https://phaser.discourse.group/t/phaser-3-pwa-platformer-example-with-spine-animations/919) uses arrays as a tilemap.

Check out levels.ts and map.ts in its [repository](https://github.com/yandeu/phaser3-typescript-platformer-example/tree/master/src/components) to see how it works.

It uses only one layer though.

---

<div class="post-metadata">

**Author:** ![Eteckq](https://yyz2.discourse-cdn.com/free1/user_avatar/phaser.discourse.group/eteckq/32/1449_2.png) [@Eteckq](https://phaser.discourse.group/u/Eteckq)\
**Post date:** [May 24, 2019, 11:33am UTC](https://phaser.discourse.group/t/create-a-complex-tilemap-from-arrays/2556/3 "2019-05-24T11:33:01Z")

</div>

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