Codea 2.1.1 Beta

The ordering-by-name still isn’t working.

Recording speed seems to be very slow (see video http://youtu.be/A0Grp7lbPtU or just posted on twitter, when not recording then that runs about twice as fast).

I got a weird effect where the special row on the keyboard appeared by itself, first on the editor screen (no actual keyboard showing) and then it persisted in the program screen. It went away when I went back to the editor and brought up the keyboard.

@Andrew_Stacey ordering by name appears to work for me (including when the app is killed and restarted). Is it just not working at all for you? Is it not working for anyone else?

The keyboard issues are often due iOS 8 — it has some serious bugs with keyboards, though they are getting better in the later point releases.

Was the recording speed for that particular demo much faster under 2.0?

@SkyTheCoder if you can, please try to keep all your code inside setup() / draw(). I think the only function that might be necessary to call in the global scope is supportedOrientations().

Codea actually disables a lot of API functions when it validates your code and executes it in the global scope because things like the renderer aren’t yet available (render commands are only available once the GL context is established and the viewer is on screen).

Recording speed has been pretty good for me, I just used the built in recorder to make a video and with the exception of one or two dropped frames speed was fine

@JakAttak just to let you know, you can record at full speed and resolution with audio on recent iPads using the lightning cable and Quicktime on a Mac. It’s probably the best way to get footage off an iPad.

I just exported my app and it runs only a black screen with the sidebar out. A little of digging showed Mark had a similar issue he tracked down to sound effects, and sure enough taking out calls to sound() using sound assets causes the error.

Any idea why this is?

@JakAttak so the sound() calls had not actually been called at the point where your app had started up?

@Simeon, no, they are in callbacks around the app, none are called in setup.

@JakAttak that’s very unusual. I wonder if it’s due to the sound assets being included in the exported project — were they the built-in sound assets?

Was there anything in the console log?

Also, is it happening in both the simulator and device, or just device?

@JakAttak I just wrote this tiny test and it appears to work correctly on simulator and device after export and build:

-- SoundTest

function setup()    
    displayMode(FULLSCREEN)
    
    sound("A Hero's Quest:Arrow Shoot 1")
end

function draw()
    background(40, 40, 50)

    strokeWidth(5)
end

function touched(touch)
    sound("A Hero's Quest:Bottle Break 2")    
end

```

@Simeon, both in simulator and on device.

Your test seems to run fine, which is weird, must be sound and something else together. I’ll try to narrow it down.

EDIT: After running your example, then un-commenting my code, my sounds no longer caused a problem…

Another issue, once I dealt with the sound is im getting crashes on start related to physics. Here’s a screencap from Xcode: https://www.dropbox.com/s/8ppdxpfc8f4ciq6/Screen%20Shot%202014-12-11%20at%209.56.16%20PM.png?dl=0

@Simeon, I hadn’t tried recording that on a previous version of Codea. What I mean is that when I record it then it runs at about half the speed of when I run it without recording.

The sorting issue in the browser is pretty consistent for me.

@Andrew_Stacey when you toggle the sorting option it does nothing?

Does project sorting not work for anyone else?

@Simeon, I’ve narrowed the runtime physics bug down as much as I could: it occurs anytime you apply a force to a body IF you have the collide function implemented anywhere.

In the example below, if you remove the collide function, it runs fine. add it back in and it crashes.

function setup()
   ball = physics.body(CIRCLE, WIDTH / 20)
   ball.position = vec2(WIDTH / 2, HEIGHT / 2)

   wall = physics.body(EDGE, vec2(0, 0), vec2(WIDTH, 0))
end

function draw()
    background(255)

    fill(0)
    ellipse(ball.x, ball.y, ball.radius * 2)
end

function collide(c)

end

function touched(t)
    local d = vec2(t.x, t.y) - ball.position

    ball:applyForce(d)
end

Hopefully this can help you find the issue

RE: Project sorting, I just tried to make sure, and no problems for me.

@JakAttak what device do you have?

@Simeon, iPad Mini 1

@Simeon When I set the project sorting to “name” then it sets it for the current session. Then at some point later, it will revert to “recent”, usually after I’ve been not using Codea for a short while (or it crashed).

I’ve had some issues with shaders not compiling when defined in code and loaded before setup is run. Reloading the project (using the on-screen re-run button) fixes it.

@Andrew_Stacey that’s very strange, that bug was present in 2.1 but I thought I had fixed it (I think @dave1707 reported it in the 2.1 thread).

In my testing (ver 2.1.1+)

  • Change the project sort to “Name”
  • Then I close Codea
  • Then terminate Codea from the task switcher (double tap home button, swipe up)
  • Then re-open, project sorting is still by name

In version 2.1 Codea would forget the sort option in the above scenario.

@Simeon That’s what was happening with the sort. As long as Codea wasn’t terminated the sort order would remain in name. Once Codea was terminated and restarted it would revert back to recent.

@dave1707 but is that resolved for you in 2.1.1? (Or 2.2)