Codea 2.1 Released

Hi All,

Thanks for the upgrade - looks amazing, but looks to have a few teething problems.

  1. Changing the background for the app - tried a few and after a while the background disappeared - couldn’t see any icons other than Codea apps. Loadded one of my apps and after running it came back again. Trivial - low priority.

  2. Aircode on Win 7 seemed to work fine, put it on Win 8 and it didn’t seem to overwrite any edits - old errors popping up - which was very confusing. Running on Firefox.34.

  3. Not sure about the speed drop, I have an iPad 2 running iOS 8.1so may not notice it - may be a feature on more recent pads?

Thanks anyway - will be watching for updates etc. Keep up the good work @Simeon.

By the way - like the look of Scratchpad - could you get a simulator like that running on a PC?

Thanks,

Bri_G

:slight_smile:

@Bri_G is Air Code okay for you in Chrome? Sorry about the backdrop bug, seems to be an issue downloading the images.

Hi @Simeon,

The backdrop bug is trivial - usually set background again after each update. It doesn’t affect the program itself.

On the Aircode - tried it with Chrome and saw the same effect. I’m not sure if it is Aircode editing or when I paste in code from Notepad++ but the app seems to lose the link even after Ctrl+R. Go out of the app, load another, then return to the edited app and the code is there but without the edits.

May be a feature of my system - if it’s temporarily losing the linkage.

Another trivial suggestion - in the Aircode editor I’d try putting the message about Ctrl+R into the page header or even put a button there to update - just out of the editing window.

Aircode is quite impressive now and I’m enjoying using it.

Thanks,

Bri_G

:slight_smile:

@Bri_G I wonder if it’s a windows line ending encoding issue. I’ll need to do some more testing on Windows.

Edit: can you create an issues for Air Code and the background bug on the tracker? Not sure if they’ll make 2.1.1, but it will be good to have them on record.

Just a quick question - @Simeon will the fix for the issues regarding changing WIDTH & HEIGHT to allow universal app development make it in it 2.1.1 ???

Sorry @TechDojo, not yet — can you log it on the issue tracker? I tend to work from there for bug fixes especially.

Though I’m thinking Codea should have a built-in way to emulate different screen sizes without you having to do anything. Something like setScreenSize(width, height)

Will do - BTW I think your idea is a good one, I actually do something like that anyway.

I think it’s a much lower priority than the slow down one as it’s easy to get round (just do a reset once the app runs) and I don’t think it happens on native iPhones.

Update : Added as issue #328

Hi @Simeon,

I haven’t placed a bug report on the tracker yet for Aircode. The reason being I can’t reproduce it. I recently upgraded to 8.1.2 and the problem appears worse now. It looks like the link keeps dropping. It could be down to the speed at which I edit/save etc against the traffic on my network.

Further, since the upgrade I have had several instances when I select one of my Codea apps and the edit window opens but immediately drops back to the main iPad window. This is a bit frustrating and inconsistent.

I’ll continue editing and try to find the conditions which initiate these problems before logging a bug report on the tracker.

Thanks,

Bri_G

:slight_smile:

@Bri_G Sorry to hear about the issues! I’m wondering if Air Code isn’t playing well with Windows, we use it quite a lot but generally on Mac OS X.

Hi @Simeon,

That could be true, been playing with it this morning and have had a lot of problems. I’m beginning to think that the problem hinges on the slowness of 2.1. What I mean by that is - I’m currently doing a lot of graphically intensive coding which builds up noise maps. This was slow on 2.0. One problem is as I update on Aircode the system restarts and it’s very difficult to see if it has finished - graphics are posted on the screen but remain there until the next run generates new and overwrites them. Do you have a clear screen function in Aircode so that as a new application runs the screen on the iPad clears?

On my suggestion above with the link description for re-running (to go in the page header) or better still a Re-run button. Could you also consider an indicator to show that the link is active.

The system has thrown me out several times - simple programs work well but large and complex systems seem to suffer.

This brings me on to threading:

  1. Could you describe the threading process - how are threads managed and prioritised?

  2. Can we program to take advantage of threads?

  3. Could the slowness of 2.1 be down to queue management?

An example of thread benefits would be the ability to load up an intro screen with a simple loading meter whilst the loading continues in the background unhindered.

I know your busy so a quick reply isn’t needed. I’ll focus on some smaller parts of the package I’m working on.

Thanks again.

Bri_G

:slight_smile:

Hi All,

Finally got something that I can reproduce.

I have a 2D simulation from a 3D heightmap demo from tnology:

demo

Code in this gist:

gist

When I run the code in 2.1 it drops out of Codea to iPad main screen. When I edit it on Aircode the app runs. I overwrote the code by cutting and pasting from the gist and the app seemed to run. But the code after pasting was not formatted. Switching to another app and back gave me formatted code - not sure if this is the old code before editing. Can anyone reproduce this?

Bri_G

:slight_smile:

iPad 2, iOS 2.12, Win 8 system

@Bri_G thanks for the detailed info. When I run that code I get “shader compile error” printed to the output box.

Agreed on a status indicator to show whether the link is active, and a restart button.

On the threading, here’s the answers

  1. The Lua interpreter and renderer now run off the main thread. Before, if you had an infinite loop in your code you couldn’t exit the viewer. Now you can.

  2. Lua doesn’t support threads (though we could introduce C apis which are multithreaded — e.g., a simulation API that calls back into Lua whenever it completes a step).

  3. I found the cause of the slowness, it wasn’t the threading itself but rather something we had done to the Lua interpreter to be able to check for when your program needed to be terminated. I fixed that particular issue and submitted a 2.1.1 update.

The main benefit of threading isn’t yet apparent. Our plan with this new architecture is to support proper debugging in the future. Since we can now run a debugging UI on the main thread while being able to stop and start the Lua and rendering code, maintaining interactivity.

@Simeon - has the triple tap to exit displaymode(fullscreen_no_buttons) been changed? It now appears to require a two finger triple tap whereas previously this was a three finger triple tap ( I think)

@West odd! It is set to 2 touches. I’ll change it back to 3.

Hi @Simeon,

Wow - you guys are really quick to chase up these problems!!!

Thanks for the feedback, looks like there may be a formatting error in the shader code. Seems a bit weird that it runs from Aircode but not from the iPad itself.

Proper debugging will be superb - really helps development zip along.

Could the termination check be the cause of the drop outs in Codea. I was tidying up my system yesterday and found several of the Codea apps I’ve written which dropped out of Codea?

Thanks for the help and the upgrade for Aircode.

Bri_G

:slight_smile:

Have posted my five star review. Sorry if everyone’s stopped talking about that by now! I didn’t read all the intervening posts–just scrolled down to the bottom to show my support.

You guys rock!

Thanks @UberGoober!

5 Star review left.

On the flip side - has this new version broken AirCode?