Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]
Photo

Tiled Map Editor - flipped and rotated tiles?
Started by nml2727 Sep 21 2019 02:01 PM

- - - - -
2 replies to this topic
tiled ponytiled flipped tiles rotated
[TOPIC CONTROLS]
[/TOPIC CONTROLS]
[modOptionsDropdown]
[/modOptionsDropdown]
[reputationFilter]
[TOPIC: post.html]
#1

nml2727

[GLOBAL: userInfoPane.html]
nml2727
  • Enthusiast

  • 52 posts
  • Corona SDK

Does Ponytiled or any other framework support flipped and/or rotated tiles from Tiled when exported as .lua or .json file?  

 

I was currently trying to use Ponytiled but I just get a ton of "WARNING: Unsupported Tiled mirror x,y in tile" messages and the map doesn't look right.

 

If it's not supported, is my best bet to just make 4x as many tiles and include one for each rotation I will need? 



[TOPIC: post.html]
#2

ponywolf

[GLOBAL: userInfoPane.html]
ponywolf
  • Contributor

  • 273 posts
  • Corona SDK

Hey,

 

The way Tiled supports flipped and mirror is a bit different than Corona does. It has basically three flags. FlipX, FlipY and FlipXY, and these flags in various combinations support both flipping and rotation. Unless you were to go in and solve for all those special cases with rotation, it doesn't really work.

 

I do support rotation via object layers, so you may want to try that.



[TOPIC: post.html]
#3

nml2727

[GLOBAL: userInfoPane.html]
nml2727
  • Enthusiast

  • 52 posts
  • Corona SDK

I was actually playing around with the tiles in Tiled and I noticed that if I only used the flip horizontally and flip vertically and did not mix those actions with the rotate right or left it seems to be working fine.  I didn't get any errors and the map displays as intended.

 

Not sure if that is intentionally behavior or I got lucky, but if anyone stumbles across this issue maybe it will help someone.

 

Regarding rotation on object layers, I haven't checked that out yet, but I'm about to dive into the object layers more now so I'm sure it will come in handy soon. 




[topic_controls]
[/topic_controls]

Also tagged with one or more of these keywords: tiled, ponytiled, flipped, tiles, rotated