I’m currently working on creating a map that is kind of similar to how you would move around an rpg map using Tiled and Dusk. In tiled I have multiple tile layers along with two object layers that I’m using for collisions. When I use the simulator everything looks like it’s in the right place on all devices and everything works fine. However, I wanted to do a quick check to see if it’s working on any devices so I put it on my Android and everything looks great except the object layer is waaaaay off. At least 3 or 4 tiles in some areas. The objects still work fine, they are just in the wrong places. Everything else is in the right place though. Is there any reason this may be happening? I am a newbie to corona development, so any help would be appreciated. Thanks!
I don’t know how Dusk works, but Tiled objects, especially in case they’re polygons, need a bit of work to be positioned properly (we do that in YATS), because the origin that Tiled gives to you for them is equal to the first point that has been drawn for it, and not to its center. So it needs to be properly offset. With rects and ellipses it should be much easier (the origin is usually at the top left).
If that’s not the issue, maybe it has to do with display.screenOriginX and Y being different if you use letterbox or zoomEven modes in the config.lua file (maybe Dusk makes it so that the tilesets start at the actual origin while the objects are still drawn at 0, 0).
Please file an issue at GitHub and I’ll see about it
- C
I don’t know how Dusk works, but Tiled objects, especially in case they’re polygons, need a bit of work to be positioned properly (we do that in YATS), because the origin that Tiled gives to you for them is equal to the first point that has been drawn for it, and not to its center. So it needs to be properly offset. With rects and ellipses it should be much easier (the origin is usually at the top left).
If that’s not the issue, maybe it has to do with display.screenOriginX and Y being different if you use letterbox or zoomEven modes in the config.lua file (maybe Dusk makes it so that the tilesets start at the actual origin while the objects are still drawn at 0, 0).
Please file an issue at GitHub and I’ll see about it
- C