Codea Runtime Freeze

I’ve been using Codea for a long time for game prototyping and I recently started playing around with the Codea Runtime to actually make a deployable version.

I have this weird bug that only occurs in the runtime and not in Codea itself.

Occasionally when the game goes to delete a physics object the app will freeze. The weird thing is that if I exit the app and re-enter it the app will unfreeze and continue on where it left off.

Any ideas on how / why this could be happening?

.@Neztec - does it happen only on the simulator or when you run on the device via Xcode as well?

There are certain situations which cause the runtime to stop rendering your Codea code, for example if you cover it with another view it will automatically stop animating (which makes sense because you can’t see it anymore). I came across this when I was adding Game Center functionality. The solution was to restart the renderer when I dismissed the Game Center view using [[SharedRenderer renderer] startAnimation].

I haven’t had any issues with deleting physics objects. You may need to do a bit of logging to narrow down where the problem is. There are quite a few apps using the runtime with physics.

It could be that you are encountering a runtime error. Errors will pause the runtime - closing and resuming the app triggers the unpause. I’ll look into the code to see where you can disable this behaviour.

Thanks guys,

Simeon was right that I just had a runtime error around collisions (still not sure why it happens in this environment and not Codea). I was able to watch the logs, catch the bug and fix it. Thanks!

Reefwing - I didn’t even realize you could fuse normal objective c work with a codea based project, so that’s good to know, thanks.

Mike