Physics and Editor bugs.

I just started using Codea a few days ago. I loaded version 1.3.? and 2 days later I updated to version 1.4. I didn’t have to wait long for an update. A lot of what I’m doing now is just trying to understand how everything works. So far I like what I’m seeing.

I ran into a bug in one of the physics routines.

In the routine “” a global function can be set up “collide(contact)”. In that function you can check the “state” of the contact. The states are BEGAN, PERSIST, and ENDED. The state BEGAN is defined as 0, the state ENDED is defined as 2, but the state PERSIST is defined as “nil” instead of 1. The value 1 can be used as a workaround in a comparison instead of the word PERSIST.

I ran into 2 problems with the editor.

The first is:
If I make an error in a line of code and execute the code, the line in error is overplayed in RED and information about the error is shown below it. I haven’t found an easy way to remove the RED to correct the error. A suggestion would be to highlight the line number in RED instead of the whole line.

The second is:
If a line of code goes all the way to the right side of the screen, either in portrait or landscape mode, the line shows up twice with the first one messed up. A easy way to reproduce this is with a print statement print(“aaa”). Just keep inserting letters until it reaches the right side of the screen.


Thats strange about the PERSIST contant, I’ll have a look at whats going on

I was playing around with the editor again and purposely causing errors to see about the RED highlighting. If I cause an error at the beginning of the code, the highlight is a light PINK and I can read the line of code behind it and make the correction. If I cause an error at the end of the code, the highlight is a dark RED and I can’t see the line of code behind it. If it would be a light PINK all the time, then it’s not a problem. I’m using an iPad 1 if that matters any.


@dave1707 I’ll look into that highlighting issue. If possible can you add it to the issue tracker?