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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.