Suggestions: Throw an error if physics.start() isn't first

Hi,

First of all, Corona is great and fun because you see results almost immediately.

Second, I hope this is the right forum for these kind of suggestions.

One thing I would like to comment on is the difference between Corona and when running on an actual device. For example when folders have a back slash () instead of a front slash (/) it works in Corona but not on my Android. However, that’s not a big of a problem because you can pick it up using adb logcat pretty easy but I wouldn’t mind if Corona throw an error first.

Second, and biggest one is that physics.start() needs to be the first function called when in fact it doesn’t need to be that in Corona.

I had setDrawMode and setGravity before physics.start() and it worked in the simulator but not on the device (Galaxy S4). When I started my app from my phone it was just a black screen and then it closed down after a couple of seconds. I know that it says in the tutorial that it needs to be first but the hard part about this “issue” is that I couldn’t find anything in logcat. I spent almost two days trying to figuring out what was wrong. First I though it was something to do with my pictures (Maybe some strange character, wrong slash etc. etc.) and then I thought it was a sqlite database that i recently have been working with.

Anywho, I love Corona however having Corona throw an error if physics.start() is not the first function or have Corona inform you about that in logcat would probably not be a bad idea.

Thanks for your attention and keep up the good work!

Best regards,

Tomas

Bump, wasted a few days to figure this out too! Still not fixed.

Hi guys,

Sorry about the confusion. I’m not sure which tutorial you’re referring to, but it’s clarified in the documentation that physics.start() should be called before making any other physics-based calls:

http://docs.coronalabs.com/api/library/physics/start.html

http://docs.coronalabs.com/guide/physics/physicsSetup/index.html

Best regards,

Brent

Bump, wasted a few days to figure this out too! Still not fixed.

Hi guys,

Sorry about the confusion. I’m not sure which tutorial you’re referring to, but it’s clarified in the documentation that physics.start() should be called before making any other physics-based calls:

http://docs.coronalabs.com/api/library/physics/start.html

http://docs.coronalabs.com/guide/physics/physicsSetup/index.html

Best regards,

Brent