Codea 2.3 Beta

@Simeon, here’s a couple of screens that show what I’m talking about:

@JakAttak That doesn’t happen for me. I think it might be some weird setting on your iPad, it looks familiar.

Okay, I fixed the tween problem. Here’s some code that should fix it for anyone else that’s having problems (just run it in setup, or floating in a tab)

_vars = {}

local mt = debug.getmetatable(tween)

local _t = mt.__call

mt.__call = function(...)
    local t = _t(...)
    table.insert(_vars, t)
    return t

local _td = tween.delay

tween.delay = function(...)
    local t = _td(...)
    table.insert(_vars, t)
    return t

debug.setmetatable(tween, mt)

@JakAttak I believe that’s an iPad accessibility setting

@Simeon, you are correct that’s my bad. Someone else had my iPad for a bit, they must’ve kindly toggled it for me :stuck_out_tongue:

All that rework necessary, and for what benefit…? :-S

@Jmv38 the stuff happening with tween should be fixed — it’s something that should not be apparent to the end user once Codea 2.3 is released properly.

The background and clip functions will also be fixed to accept floating point values (… although clip really should be integer only. I’m tempted to leave clip as is)

good morning @Simeon, just updated to 2.3 ( 36 ) and I have to report ( as I usually do :slight_smile: ) a slight speed/performance drop. I’m talking about 5/10% in the worst cases as far as I could see
Most of ( mainly i’d say) my code runs meshes with large spritesheets

So what used to run steadly at 60fps is now running at 50/55fps or so.

Ipad 3
ios 8.1

thank you for your great work!

@deactive very odd, I wonder if that is attributable to Lua 5.3. I’ll have to run some benchmarks to find out.

The example program ‘Anagrams’ needs a fix due to, at least, the changed behaviour of math.random(). In the Fireworks tab, line 252 might be changed to:

ret = number - ret + 2 * ret * math.random()

hey! good to see you back @Mpilgrem

@SkyTheCoder thanks for that :slight_smile: It seems to be working for me like that, no more tween problems

@Simeon I hereby confirm SkyTheCoders tween issue, I’d also like to report to you that the problem with dropbox I told you about earlier in this thread, only seems to occur when the file which gets replaced, has another extension than the original one

for example, if I have an image on my dropbox (and sync it with codea) called ‘bg’ and that image is of the .png format. If I then delete the image of my dropbox and upload a .jpg image with the same name (‘bg’) and resync it with codea, the image doesn’t get used (although it noticed that 2 items changed (1 deleted, 1 added))

It’s not a big deal but I thought I’d mention it anyways

(I think this is because codea assets are actually stored with extension?)

@Simone Here’s my speed test again and there is a slowdown. There are 2 groups of ten times. The first was times starting from the editor. The second was doing replay. The time I got when I did the original program was 7.77 seconds with Codea 2.0 on the iPad Air.

function setup()
    for z=1,loop do

started from the editor


started using replay


@dave1707 I wonder if this is a performance regression from Codea 2.2 (as @deactive suggests). If so, that would be due to Lua 5.3.

Also; A glitch I noticed since the Camera update,when you hit restart while usin the camera, the camera flips upside down

ContentScaleFactor isn’t highlighted in gold like it used to be.

@SkyTheCoder tweens are being garbage collected if not explicitly stored. Unsure why this change occurred, but will fix to ensure they are not collected until they complete.

I’ve been testing 2.3 with a number of my projects and everything pretty much works, apart from:

Some fairly odd syntax checking behaviour with Fred Boggs ABCNotation class that I pinched from Cargobot (which also exhibits this issue) and now doesn’t run. Looks like it’s objecting to some of his string definitions - but skimming his code I can’t really see what it is.

The old stalwart JSON parser that a lot of people tend to use: dkjson.lua no longer works. Looks likely to be another varargs or string issue.

Also a number of Codea demos no longer work:

  • Cargobot (as discussed - ABCNotation lib issue)

  • Speech.say() method not recognised in Speakeasy demo

  • & String.upper(TitleText) returns nil in Parameters demo

I’ll let you know if I find some more :smiley:

I’ve encountered another issue, tho… I don’t think it’s codea 2.3 related…

I’m having an image with dimensions 3451x88 and it can’t be displayed with sprite… no errors tho

I think the problem has something to do with the last answer in this discussion perhaps…?

Since it’s an ‘odd’ width size, or is my image just to big? I’m sorry if this isn’t the appropriate topic to place it in, but I thought I might as well place it here as I haven’t had the chance to test it in 2.2

EDIT: I was able to load the image, tho I had to save it to documents first, it only had this problem when loading from dropbox (the image in the documents is way smaller tho…)

@stevon8ter, It’s because that image is larger than the maximum allowed size (which I think varies per iPad - something like 2048 x 2048 or 4096 x 4096)

If you have a newer iPad which sound be 4096 max, try storing the image with readImage and spriting that rather than spriting the file name directly.