Codea 2.2 Beta

@SkyTheCoder I’ve noticed this bug, sometimes if I hit the pause button wrong. I’ve also noticed it happen without using the pause button, if there’s a bit of lag it will freeze.

hi @Simeon, don’t know if this is the proper place to report, but …my very first impression of the 2.2 beta was actually good.
Performance issue seems to be solved, as my program sticks to 60fpd making use of several meshes with, in some cases large spritesheets and rects( 1500x1500px ).
Also, the above benchmark code also took only 50 secs to run when it used to do it in 119 secs with codea 2.0 and 2.1.

Looks like a very promising update :slight_smile:

My Codea is still broken in the respect that it doesn’t save my settings, and I can’t sync to Dropbox…any solutions? When I try to set my background, it just gets stuck on the picture of the log, when I try to link my Dropbox, after authorizing in the Dropbox app, it just gets stuck on the loading icon, and my project icon size gets reset if I close Codea. The Dropbox part is probably my biggest problem, because a lot of my projects using Dropbox sprites are now broken… (I can see the files are still in my actual Dropbox, just not in the Codea app)

@SkyTheCoder it almost sounds like Codea is unable to write to he file system on your device. Could you try backing up all your projects (I.e., with iExplorer) and then deleting and reinstalling Codea?

@Simeon Last time I tried backing up Codea in iExplorer, nothing showed up when I opened Codea, and everything was a bit broken. I think the iExplorer problem is a problem with my iPad, because my charging port is broken and it can’t connect very well. Codea can save new projects to my iPad, but even with free space, the settings aren’t saved. Is it possible to do an iCloud backup and get Codea’s files out of there?

@SkyTheCoder that makes things tricky. I wouldn’t trust an iCloud backup to work — It has been inconsistent for me when restoring app data.

You could write a Codea app to upload all the code somewhere. Alternatively you could copy and paste the code out using AirCode — or in the next beta, it will have a RESTful API that would let you pull the code out using JavaScript or something.

@Simeon is there a reason why the default speech speed is so fast?

@Mark I mentioned the speech speed being too fast in my post above. Thanks for agreeing with me.

@Mark @dave1707 I believe the built-in speech synthesiser’s default settings are very fast. Unsure why this is. I left Codea to default to Apple’s setting but I can have it default to what I chose for the example project instead?

Edit: It could be because its use is primarily for accessibility, so having it speak fast makes it faster for someone to navigate a UI (i.e., it doesn’t matter that it sounds strange, only that it gets information across quickly)

@Simeon Personally, it would make sense to me if normal speed was 1, half speed was 0.5, double speed was 2.0, etc. But if that would be too confusing for those who are used to Apple’s values, I understand.

@Mark I’ve changed the default rate to 0.1

The Apple min, max and default are 0.0, 1.0, and 0.5 respectively. The default rate (0.5) is very fast.

We could map the range [0.0 - 0.1 - 1.0] to [0.0 - 1.0 - 2.0] for the rate option. I think setting the default to 0.1 might be enough though.

@dave1707 regarding your earlier benchmark, I get a consistent 8.7 seconds on every run when profiling it. Is it possible that there was something else running? Does it still consistently produce a slower first-run for you?

@Simeon Running the code below, here are my results. Codea is the only thing running. I’m using an iPad Air 16GB with iOS 8.1.3 with 5.9 GB available. I’m running Codea 2.2 (28). Is there anything else you want me to try or any other information you could use.

Test code.

function setup()
    loop=10000000
    s=os.clock()
    for z=1,loop do
        a=math.sin(z)
        a=math.cos(z)
        a=math.log(z)
        a=math.sqrt(z)
    end
    print(os.clock()-s)
end

Here are the times starting the code from the editor. 10 runs.

17.99
11.88
8.26
17.66
17.83
17.78
17.84
17.63
17.62
16.90

Here are the times starting the code with replay. 10 runs.

8.23
8.20
8.29
8.26
8.22
8.20
8.21
8.23
8.22
8.31

@dave1707 very odd, I’ll have to do some more testing. I always get the ~8 second times.

@Simeon I loaded Codea 2.2 (29) and ran the above test again. Here’s the results.

Running from the editor

8.22
8.25
8.27
8.24
8.25

Running using replay.

8.21
8.20
8.21
8.33
8.22

@Simeon Tried to get Codea to drop tabs by hitting the run and close icons at the same time. I tried about 20 times and it didn’t drop a tab, but Codea crashed 2 times in those 20 tries.

@Simeon The default speech speed seems just right.

applyLinearImpulse and applyAngularImpulse were added to version 2.2 (29) . They both seem to work, but I really don’t have a good test for them yet.

@dave1707 I’ll give applyLinearImpulse a shot in my game, see where it takes me.

@Luatee From what I see so far, applyLinearImpulse give an object a velocity in some direction and when used with World Points also causes a rotation. I tried it with the example you had in another post using applyForce. I replaced applyForce with applyLinearVelocity and the result was even worse.