Codea 1.5 (Beta 12)

Closing this thread. Beta 13 discussion is now here:

Another beta, another thread.

I’ve made a fairly large change to this build: The tab bar now scrolls off the screen to show more code. Scrolling up immediately brings it back. Let me know what you think about this change.

The fixes are outlined in the release notes.

However there are some things that have not been fixed:

  • tween documentation issues mentioned by @mpilgrem
  • saveProjectTab() use when explicitly naming the current project
  • unable to import photos in landscape mode mentioned by @tnlogy (cannot reproduce this one)
  • unable to run Graphics Styles example mentioned by @Codeslinger (cannot reproduce)

I’d like to consider renaming the BLEND_* constants as mentioned by @mpilgrem as well. It’s not pleasant to have the BLEND_ prefix used in so many instances.

@simeon - I really like the tab bar feature, the extra space, while only a couple of lines, is very welcome when typing directly on my iPad.
Any plans to be have it in the shaderlab too ?
Concerning the shaderlab, can we get and option to hide the preview for fullscreen code?

I’ll second renaming the blend constants. They’re a pain to type with the underscores and you have to type a large segment of the name before you can see the name in the autocomplete list.

I found out what the problem with GraphicsStyle is for me. It contains some UTF-8 non-breaking spaces “0xc2 0xa0”. I think my installation is one year old, the occurrence of nbsps in the examples may have been eliminated now. If I delete these spaces the code runs as expected. This seems to be similar to the problem I had on the desktop where Lua rejected nbsps. But Codea was able to run such scripts in the past, what happened?

I think that “long press delete” still misbehaves in beta 1.5(12).

I too like the tab bar feature and would vote for its equivalent in the Shader Lab.

Until the expression key pop up has been dismissed, the hide keyboard key does nothing. Perhaps it could dismiss the pop up too?

Behavior of saveProjectTab() with nil content:

Tab in same project: contents are cleared, tab still exists. Is the tab supposed to stay there or be deleted? If I want to clear the contents and keep the tab I’d rather set it to “”.

Tab in other project: Codea crashes.

.@Simeon I recall in another thread that you had plans to delete the tab if the contents param to saveProjectTab() was nil…are there plans to include this behavior in 1.5? I have an idea for a remote project bootstrap sort of thing, but it will depend on that behavior. It would awesome I’d it does make it into 1.5 :slight_smile:

Is the following a bug, or by design?

-- Print Test

-- Produces differently formatted output in Codea 1.4.6(15)
-- and beta 1.5(12). In the beta, tab characters are treated like
-- single space characters
function setup()
    -- Produces the same output in beta:
    print("a", "b", "c")
    print("a b c")
    -- Produces the same output in beta:
    print(1, 2, 3)
    print(tostring(1).." "..tostring(2).." "..tostring(3))

function draw() background(0) end

.@Codeslinger @toadkick saveProjectTab with nil should delete the tab. I’ll have to fix this bug, sorry about the crash issue.

.@mpilgrem I think this is to do with the way the text rendering has changed in the output window. I’ll see if I can make it respect \t characters.

Where is saveProjectTab (and any related functions) documented?

At the moment, the only “documentation” are the help bubbles when you type the function name in the editor.

Yes. No documentation for that yet. There is a lot of work left to do.

There is still a refresh glitch with “selecting” and deleting a single word (undo feature has the same refresh issue).

Also, I’m having issues using arrays as uniforms

m.shader.c = { vec3(1, 1, 1), vec3(1, 1, 1) }

uniform lowp vec3 c[];

is that code not supposed to work ?

There are a few display glitches with commenting:
Any “+” you add after a comment will make the a number of characters starting from the end of the line appear white instead of green.
Here, the last character appears white


C type comments "green" out the code as a regular -- comment would, but they obviously don't work.

Block comments aren't displayed properly
this is not "greened" out


Finally, the += button still does variable = variable + in the glsl editor but that's not really a bug.


Cursor lost bug it is almost solved: it works for the tabs, but it is lost for the main tab.

look and feel v12.
The tab names going away is excellent.
I am not a fan of the new color for contextual suggestions: i peferred black to tuquoise.

editor slow when clicking in the text to pop up thhe keyboard, i frequently have to wait 1-2s for moderately long tabs. Feels long…

I really like the idea of being able to build a shader with a string (you can really customize shaders).
However, i just can’t get it to work (nothing gets displayed, as if shader error)
Can anyone tell me how they get it running ?

function setup()
    vertexSource =
    " attribute vec4 position;"..
    " void main()"..
    " {"..
    "     gl_Position = position;"..
    " }"

    fragmentSource =
    " void main()"..
    " {"..
    "     gl_FragColor = vec4(1.0, 0.0, 0.0, 1.0);"..
    " }"

    m = mesh()
    m.shader = shader()
    m.shader.vertexProgram = vertexSource
    m.shader.fragmentProgram = fragmentSource
    m:addRect(0,0, WIDTH, HEIGHT)

function draw()


edit: ok got it to work..
myShader = shader()
myShader.vertexProgram = vertexSource
myShader.fragmentProgram = fragmentSource

m = mesh()
m.shader = myShader


@Simeon - the + glitch that affect highlighting also happens with strings, which is actually more annoying :P

BUG PASTE PROJECT unless i did sthg wrong, i think the ‘long press on +’ to paste a project from the clipboard works only when the project has tabs. It is a bit annoying in the case of short projects made of 1 tab only.

Actually it should work as long as the project is in the right “format” — that is the project needs to start with --# Main (have at least one tab).

So if you copy a 1-tab project using the touch-and-hold to copy method, then you should be able to paste it through the ‘+’ button.

.@bortels (continuing an old discussion) hello! I have finally managed to store user information by going to PHP. You can have a look at my final solution at
I have found the site ‘ready to use’ on the web. Actually, i had to work a couple days to understand how to make mySql work on my web host, but that’s done now. And i am pretty happy of the result. Thank for giving me the initial impulse!