Codea 2.2 Beta

Ah, thanks for the debugging of the shader issue! :slight_smile:

For the first time ever in my use of Air Code, it just crashed and deleted half my tabs. I checked iExplorer, the files are completely gone. (Luckily I was just monkeying around with a project I have already exported)

This may not be a 2.2 issue, but it has never happened to me before.

Using iOS 8 on an iPad Mini, OS X Yosemite on a Mac Mini, and Chrome browser.

Before you submit 2.2, I’ve been forgetting to report a few bugs/weird things:

  1. My Codea’s app images seem to have disappeared - the pause button is invisible, I can’t change the editor background, and it doesn’t seem to be saving my settings (font size keeps resetting itself) (note, I am low on space)

  2. Pressing the documentation or search buttons on your keyboard in the editor twice really quickly can cause a black panel to be stuck on the left side of the screen, and goes away when you show/hide the documentation or search again.

  3. If you were in landscape mode in the editor, then run an app that forces your iPad into portrait mode and shows the keyboard, when you go back into the editor, the keyboard is sideway (changing your orientation manually fixes it)

  4. The shader lab has been inconsistent for me with saving, and I find myself saving my shader code to the Notes app just in case - occasionally, when I leave the shader lab and come back to my shader, it has been reset to the default shader, like it didn’t save anything.

@SkyTheCoder it sounds like 1 & 4 might be symptoms of low disk space. I’ll have to think about how to handle that. I will look into the other two as well, if you have time I’d appreciate if you could log them on the issue tracker.

@Simeon Issue #1 started occurring when I had over 100 MB of space available.

Couple bugs:

  • saving the project icon from the interface button doesnt work on my project. [EDIT] happens only when project:icon is already defined. I had to manually delete the project:icon image to get it work. When saved from button, it should overwrite project:icon, shouldnt it?
  • copying text to clipboard (a long project i suppose) crashes codea.
  • from project panel: show content left panel, the project panel background disappears, and remains gone when i close left panel.

@SkyTheCoder the project browser background in particular is stored in Library/Caches, so when iOS “cleans” apps when it runs low of disk space it kills this folder. This also includes pre-rendered UI assets (like the pause button). My guess is iOS cleans out the assets folder but doesn’t kill the app, so it doesn’t get a chance to re-render the UI elements and other assets. Did the pause button eventually come back?

@Simeon The pause button came back, but I still can’t change my background. Also, is it just me, or does the pause button occasionally freeze up the entire app, not letting you even unpause?

@Simeon - I don’t have an iPad anymore, so I can’t really test Codea anymore. Feel free to remove me from your beta testing lists. Thanks, and good luck with Codea and your other endeavors (especially Crabitron, looks promising)!

@Zoyt no problem

@everyone I’m moving over to Apple’s TestFlight service for future builds — the old TestFlight service is shutting down on 26 February, so this is a forced requirement.

The only issue is that you will need iOS 8 to use the new TestFlight app. Other than that, the service seems better.

Just a post to direct new beta testers to this thread. You can use the “beta” category to ensure your beta-related posts are only seen by other beta testers.

Loaded the current Codea version 2.2 (28) and ran some mesh tests. I ran 1000 and 2000 individual meshes of 3 different sizes, 20, 100, and 200. This was run on the 2.1 version before loading the 2.2 version. The average FPS was done over 1000 draw cycles and the result shown. Here are the results. The speed increase wasn’t that much. This was run on an iPad Air.

     1000  meshes  size   20  ver 2.1   FPS  24.8   ver 2.2  FPS  25.7    
     1000  meshes  size  100  ver 2.1   FPS  24.7   ver 2.2  FPS  25.6
     1000  meshes  size  200  ver 2.1   FPS  24.5   ver 2.2  FPS  25.7
     2000  meshes  size   20  ver 2.1   FPS  13.5   ver 2.2  FPS  14.8
     2000  meshes  size  100  ver 2.1   FPS  13.8   ver 2.2  FPS  14.9
     2000  meshes  size  200  ver 2.1   FPS  13.8   ver 2.2  FPS  14.0

@dave1707 thank you for the detailed testing! In my testing the gems mesh demo (the old ‘hello mesh’ example) runs at 50 fps on my iPad mini 2, it used to run at 30 fps on version 2.1.1.

The performance increase comes mostly from improvements to CPU bounds code (not rendering). So tight loops and such.

@Simeon Here’s the code I used for the mesh tests if you’re interested. Also, there’s a small orange dot under the Codea icon on the iPad’s main screen. Does that mean it’s a test version and not the latest real Codea version.


displayMode(FULLSCREEN)

function setup()
    --[[
     1000  meshes  size   20  ver 2.1   FPS  24.8   ver 2.2  FPS  25.7    
     1000  meshes  size  100  ver 2.1   FPS  24.7   ver 2.2  FPS  25.6
     1000  meshes  size  200  ver 2.1   FPS  24.5   ver 2.2  FPS  25.7
    
     2000  meshes  size   20  ver 2.1   FPS  13.5   ver 2.2  FPS  14.8
     2000  meshes  size  100  ver 2.1   FPS  13.8   ver 2.2  FPS  14.9
     2000  meshes  size  200  ver 2.1   FPS  13.8   ver 2.2  FPS  14.0
    --]]
    
    -- the count and fps average will stop updating at 1000 draw cycles.
    
    count=0
    tot=0
    tab={}
    for z=1,1000 do --# of meshes
        table.insert(tab,m(math.random(50,WIDTH-50),
            math.random(50,HEIGHT-50),math.random(360)))
    end
end

function draw()
    background(40, 40, 50)
    fill(255)
    for a,b in pairs(tab) do
        b:draw()
    end
    if count<1000 then
        count=count+1
        tot=tot+DeltaTime
    end
    text("count  "..count.."       fps  "..count/tot,WIDTH/2,HEIGHT-50)
end

m=class()

function m:init(x,y,r)
    self.x=x
    self.y=y
    self.ms=mesh()
    self.rot=r
end

function m:draw()
    pushMatrix()
    translate(self.x,self.y)
    rotate(self.rot+count)
    
    -- comment and uncomment the different sizes.
    self.ms.vertices={vec2(0,0),vec2(20,20),vec2(20,0)}
    --self.ms.vertices={vec2(0,0),vec2(100,100),vec2(100,0)}
    --self.ms.vertices={vec2(0,0),vec2(200,200),vec2(200,0)}
    
    self.ms:setColors(255,0,0)
    self.ms:draw()  
    popMatrix()
end

@dave1707 the orange dot does seem to indicate that it is a beta version of the app. Thank you for the code — so the reason your code doesn’t see much speedup in this version is because it is not very CPU bound. The Hello Mesh example, when set to about 3000 polygons, which iterates through all rects and updates their positions, is a good candidate for performance improvements in this release.

@ Simeon I thought maybe drawing a lot of individual meshes would be a good test. Guess not. I just ran into something weird, but I haven’t been able to recreate it. I was editing some code and when I ran it, there was a line of auto complete commands at the bottom of the screen. I don’t remember what list of commands it was showing, but it overlayed the exit, replay, etc buttons. I couldn’t exit the code and I had to kill Codea to exit the program.

@dave1707 thank you for that, I’ll try re-create the autocomplete overlay issue.

@Simeon Here’s my original time test. It used to run in 7.77 seconds. I’m getting 2 different times now. If I run this from the editor, it takes 17.6 seconds. If I run it using replay, I get 8.2 seconds. I ran each several times and those were the times I got the most. I’m not sure what’s taking so long when it’s started from the editor, but it’s still slower than the original time.

EDIT:These times are for the iPad Air.

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

@dave1707 interesting, thank you for that benchmark. Will profile and see what’s happening when running from editor.

@Simeon I’m playing with the speech command. The speech is too fast at the default value off .5 . I have it set at .1 for what I consider normal speed. Does this vary by device. It will probably vary by each person, so we can see what others have to say.