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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

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