bodyType is a special value; it’s not added (not even in “normal” circumstances) from within the physics table. So when you want to set the bodyType, you have to just add it to the object, not the physics table (which means bodyType isn’t prefixed by physics:).
As for properties for the objects, use the objects: prefix:
[lua]
objects:bodyType = static
[/lua]
For tile layers, note that this prefix is tiles: instead.
If it surfaces again, you can try filing a bug report on GitHub and I’ll see what I can do. I’d like to ask, though: Have you seen it on any other maps (i.e. create a new blank map, add a tileset, make objects, and run it and the problem appears)?
One thing off-topic that I’d mention is that because the properties “playerLocation” and “finishLocation” are prefixed with !json! , Dusk knows to send the rest of the property to the JSON reader. Thus, it creates a table according to the JSON notation that follows.
You could just as easily do this, because of the way Dusk (by default; it can be disabled if you need dots to be read literally) treats the dot character:
[lua]
playerLocation.x = 5
playerLocation.y = 11
[/lua]
(another thing off-topic I’d like to mention is that I’ve written a notation parser for a future version of Dusk that takes notation in the exact form as a Lua table: {abc = 123, [“something else”] = 64.388} so as to remove the gap between properties and Lua code. I’ve also completed a fully-featured math solver with a complete implementation of the Shunting-Yard algorithm and variables; imagine this for a property: someWeirdValue = sin(map.width) * 64 + (map.height / cos(layer.alpha)))
Yeah I’ve recreated multiple brand new maps and reloaded everything from scratch and the problem still would occur exactly when I create an object layer. I would just create an object layer save and export and the flickers on the screen would go nuts, but if I delete the object layers or make the object layer at the very bottom the flickers 100% go away. If I move it up +1 layer they come back… I don’t mind filing a report to help get this solved, I will try to make the file as minimal as possible.
Working with Tiled, I created some platforms from lines. I had a problem where the “player” object jumps visibly above a platform but it still passes through. If the player object gets high enough above the platform it will land on it. Trying to sort the problem out I was looking at the bounds of the platforms. The platforms were drawn as single lines with two points in Tiled. When I examine the bounds in Corona these lines appear to have a height of 12pixels!
If I draw a platform as a box, with a height of 0, the bounds work out correctly. Though in Tiled it’s impossible to get to the properties of an object with 0 height.
This picture shows Tiled in the background. The red lines are platforms. In the Corona simulator in the foreground you can see magenta rectangles. I drew these using the contentBounds of each of the line platforms.
Not sure what I’m doing wrong here. I have an objects layer in Tiled. If I set properties on the Layer all the objects the properties. If I set the same properties on objects individually they don’t seem to get the properties. For example, I set the layer properties as:
objects:collisionType = platform <-- works fine
Setting the same property on an object has no effect. Setting the property as: collisionType = platform, doesn’t work either.
The platforms were drawn as single lines with two points in Tiled. When I examine the bounds in Corona these lines appear to have a height of 12pixels!
This could be because of the display part of the line; Dusk gives line objects strokeWidth so that you can see them for debugging.
To see your line objects, use this:
[lua]
dusk.setPreference(“virtualObjectsVisible”, true)
[/lua]
Everything is working for me, so I’m not sure what’s happening. If this issue turns out to be a real problem, can you file an issue with a test case included at the GitHub page?
Same with the property thing; setting it on the object works for me.
My work around was to use rectangles for platforms. In Tiled, if you set these to 0 height you can’t select them, which is frustrating. Be sure to set the height! This was a problem I was having with the Platformer, in the previous Ceramic demos. Many of the platforms were unelectable, which I realize now was due to the 0 height.
I just did a quick test to print the size of a line element in the terminal. It showed a height of 12 pixels with the virtualObjectsVisible true or false. I’ll make a test example and file an issue later today.
The limit is a maximum file dimension (width and height). Check the the dimension on your file, if it’s larger you can break your tiles into two sheets.
If you’re testing in the simulator this is probably not a problem. I don’t think the simulator recognizes this limit.