Jump to content

Tilemap: Multiple z Levels


Sg1team
 Share

Recommended Posts

Hi,

 

I would like to create a top-down strategy game with multiple z levels (to dig tunnels into the ground).

How can I achieve that with Phaser? I need multiple tilemaps that the user can switch between. The units (sprites) should only be visible if their respective z-level is active. Sprites should also continue to move if their z-level is currently not visible.

 

Thanks in advance!

Link to comment
Share on other sites

  • 1 month later...

You could try this:

 

Put your sprites in groups, one group for each layer.

 

Make the layer and the group for the current level visible.

Set the other layers and groups to visible false.

 

If a sprite digs down (or up) move it from one group to the other.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...