Jump to content

using Tiled to create Sprites


MajorQuazar
 Share

Recommended Posts

Hi,

I am relatively new to Phaser 3 and Tiled. I have gotten the hang of the basics of making 2D maps using Tiled and getting them into Phaser 3.

I now want to place sprites at certain locations on the map (aka moving robots that will fire) however I want to ensure that these sprites are placed precisely on the map grid.

Can I place tiles in Tiled and have Phaser 3 interpret these as Sprites?

---

I have used the Phaser function below however, the original Tiles remain in place in addition to the creation of the sprites. I want the placed Tiles to be Sprites and not leave behind any tiles in their original starting position.

map.createFromTiles([256, 257,258], null, {key: 'mininglaser'})
 
Link to comment
Share on other sites

Not familiar with Phaser, but I am familiar with Tiled so I can provide you a generic solution and/or direction. Besides tile layers, Tiled supports object layers as well. You should google it up and learn about it. The while idea about objects is that they do not represent a tile but an actual ingame object. And Phaser probably has an interface to extract those objects from the Tiled map. Which one I don't know, but they probably have one for certain.

Link to comment
Share on other sites

 Share

  • Recently Browsing   0 members

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