complex shapes problem

Hi,

At last I’m forced to post on the forum after months of reading, learning and trying to create. Let me just say this forum is a lifesaver and the topics in combination with a search function saved me alot of time. :slight_smile:

I’ve just started out with Lime and am just going through the tutorials. Pretty basic, nice and simple. Until I reached tutorial 8: complex physics objects.

I recreated the map, build the object, created the points and loaded Corona. Error. Since version 2.9 Lime uses Json. (please update the tutorial? :))

Anyway, I pasted the new line I found in terminal ([“point1”,“point2”, etc etc]) and reloaded Corona: the new error was _string = a nil value.

Instead of the copied line I rewrote the line manually. From that point on all Corona does is crash. The map cannot be loaded any longer. The tutorial sample does load, and the physics do work in the tutorial sample, but not in my version though.
I tried remaking the map, started copying files from the tutorial dir to my game directory. Tried to make sure my version is the exact same as the tutorial version. No good.

Disabling the points/removing the shape property makes the map work again, meaning Corona loads without crashes and the map appears visually, but of course without the shape. Enabling the points again: crash.

I tried renaming every point using: point1, pointA, a, A etc.
my line for the points is: [“point1”,“point2”, etc etc]
type of the first point is: Body
bodyType = static
It doesn’t matter if I use 4 points or 8. same crash.

I keep getting the following error:
__________

Print:statusbar disabled
Print:background created
WARNING: Cannot create path for resource file ‘ui.lua’. File does not exist.

Print:lime loaded
Print:map loaded
Print:visuals created

– the following would be ‘Print:physics loaded’ … but here the app crashes

Assertion failed: (area > 1.19209290e-7F), function ComputeCentroid, file /Users/ansca/.hudson/jobs/Main-DMG/workspace/platform/mac/…/…/external/Box2D_v2.1.2/Box2D/Box2D/Collision/Shapes/b2PolygonShape.cpp, line 127.
/Applications/Corona.268/Corona Terminal: line 9: 82540 Abort trap “$path/Corona Simulator.app/Contents/MacOS/Corona Simulator” $*
logout
__________

Something tells me this is just a matter of one little detail which makes Corona crash… My guess is it something I’ve done wrong in Tiled. I’ve checked for double naming, thats not it. I just cant find it :frowning:

Sorry if this post is a bit chaotic. Your help is very welcome though. :slight_smile:
Regards, Jeroen
[import]uid: 14085 topic_id: 9334 reply_id: 309334[/import]

Strange coincidence, I have literally just updated to list the Json properties - http://justaddli.me/tutorial.php?t=0&id=8

However the issue you are having is probably connected to the actual physics object you are creating, it needs to have 8 points or less and must be convex and listed in clockwise order. [import]uid: 5833 topic_id: 9334 reply_id: 34084[/import]

Fixed. The problem was the points weren’t listed clockwise :slight_smile: Thank you! [import]uid: 14085 topic_id: 9334 reply_id: 34093[/import]

Awesome, glad it’s all solved! [import]uid: 5833 topic_id: 9334 reply_id: 34095[/import]

Hi Graham

I am new “limer”, just starting to walk, followed first tutorial, also got this warning:

WARNING: Cannot create path for resource file ‘ui.lua’. File does not exist.

What can i do about that? Should I worry about it?
[import]uid: 13099 topic_id: 9334 reply_id: 42538[/import]

You can safely ignore that one. I will make sure it doesn’t display the warning eventually, keep forgetting to get round to it :slight_smile: [import]uid: 5833 topic_id: 9334 reply_id: 42553[/import]