zetsubou

Tilemap objects

Recommended Posts

Hi! I've spent a lot of time thinking of game entities. So, the mostly recommended option is object layers from tilemap. Here comes the question: am I possible to make an object, that consists 4 tiles and its treated as one? At the moment, I just create object, that take's 1 tile out of 4 necessary ones. In the end i got an object, that 4 times smaller than it is supposed to be. Any ideas, advices?
Saw a couple of videos about object layers, still did not find anything useful for me. Please help!
UPD: also enemies are not supposed to be static(they will be moving from one side to another)

Share this post


Link to post
Share on other sites

Object layers simply hold geometric data which Phaser rarely uses directly. It's up to you how you treat that data - if you loop through the object layer, you can choose how to interpret each shape and whether you want to use its size at all. Unless you're setting a Sprite's size to the size of the tilemap object, it doesn't really matter how big it is.

Anyhow, you can definitely resize objects in Tiled. Click on the object and you should get control points around it which you can use to resize it. Alternatively, you can directly enter a size in the object's properties.

To answer your other question, moving the enemies wouldn't be a problem at all. Use the object data from the tilemap to add them as Sprites and you will be able to move them like any other Sprite.

Share this post


Link to post
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...

  • Recently Browsing   0 members

    No registered users viewing this page.