Codea 3.11 Beta

This beta is waiting for Apple approval but should be available shortly. In the mean time, there are more slots on the beta link:

iCloud

  • Codea now supports creating projects locally, or in iCloud Drive. You can select a project’s location from the create project screen
  • Long press a project to move it between iCloud Drive and your local device Documents
  • Share projects with other people to edit them collaboratively
  • Create folders in iCloud drive on the Files app to view them in Codea

Project Grid

  • New create project screen
  • Allows you to select a tint color for your project icons

Pointer Lock

  • You can now set viewer.pointerLocked = true to lock the cursor to your running project

Fixes

  • Fixes an issue when rendering text() from within a coroutine
  • Improves the stability of multi-window rendering
  • Improves performance of spriteSize when called often
  • Fixes modern renderer hanging on run when using require() in some cases

@sim - ran this latest beta and didn’t even run properly. Crashed twice on me two reports sent. Last report copied below-

Weird when I tried to run a project got a black screen, only image visible was in bottom left corner the exit button tapped on that and it looked like I had tapped on a project below the black screen in the project window. Looked like the Codea running window was all black above the project window screen and tapping on the only button visible crashed Codea. Used the menu list top option to report this and black screen seemed to be incorporated in the report.

Edit: The crash was on the first project I tried to run. Went Back after the crash and ran several other projects OK.

Only thing I can think caused the problem could be not finding the graphic images I use in the code.

I’ll check through the code to see if I can isolate the proble and report later.

Edit2: I’m sure it’s down to asset loading. I had loaded the latest beta on my old iPad, when I looked at the code it was using the old sprite addressing method “Folder:image” and the folder didn’t contain all the required images.so could be a combination of old code style and trapping errors.

@Bri_G I think there’s a bit of a misunderstanding. This beta (3.11) hasn’t been released yet. The latest is still 3.10.1 — this version should be available soon, just waiting for Apple review

@sim - that makes sense as my old iPad was a few versions behind. So it is the latest released beta, not the one you mentioned in your post.

The release is out now, sorry about the confusion!

Tinting is cool!

IMHO you should be able to change the tint of a project without having to rename it.

I took an existing project and tinted it and renamed it so that the tinting would stick. I then changed the name back to what I wanted it as in the first place, and now the project icon has disappeared entirely.

It came back when I left the forums though.

1 Like

Yes! We have a ticket for this. We just decided to ship the beta anyway and add it in a future build. Basically we will just allow rename without actually changing the name

Thanks for the note on the missing project icon. I’ve seen that too and we need to investigate

@sim - just posted an error when 3.11 crashed on me. Just ignore - I slipped into bad habits and used pushStyle() and popStyle() in a basic setup within the draw() function. It fired out a lot of errors and eventually crashed while I was trying to correct it. Note the syntax highlights for the Codea 3 are still in play in the formatting of commands and the errors correctly pointed to the wrong syntax, hence my confusion. To avoid this it would be better to format the V3 syntax in enhanced red if the parser still accepts V3 syntax as legitimate code.

1 Like

@sim just posted a crash report with the following text:

Just set up a basic background display to detect and adjust to orientation. Testing it out seemed to run OK but crashed just after exiting running project. The test involved calling a function to build the background and add a few sprites. I noticed when I looked at the error display that the errors were flickering - it looks like the error counting is not trapped at a 999+ errors and I think it may exceed memory limits.

Edit: tried in V3, error again - error report below.

Related to my last post, I ran the code again this time in V3 which also came back with the error that the addressing mode that I used was deprecated, ran up to 999+ then effectively froze. Not responding to touch. Closed Codea by dragging up Codea window to minimise, then drag off screen when the crash occurred.

All - help, I’ve been racking what’s left of my brain to get the size of a sprite in V4. I’ve tried variations of sprite, image, spriteSize and even entity to read the info with no luck. Tried going through the attached documentation but with no success.

I found spriteSize very useful at times - please point me in the right direction.

Thanks in advance.

I reckon you might have to use local img = image.read(asset.yourImage) and then check img.width and img.height

Codea 3.11 (464)

ENHANCEMENTS

  • You can now multi-select files when importing sprites or other assets

  • Importing a single image from your documents will pre-fill the file name

MODERN RENDERER

  • image.read can specify srgb options (image.read(assetKey, {srgb = true|false}))

  • colorspace(GAMMA|LINEAR) can be used to change the currently active color space

  • LINEAR rendering allows for nicer lighting for 3D models but otherwise has little effect on 2D rendering (except for some blending effects)

  • GAMMA mode simply leaves colors in their original form and is better for strictly 2D rendering

AIR CODE

  • Ability to delete projects in VS Code

OBJ-C

  • objc.affineTransform added for those who like their world in 3D

FIXES

  • parameter.vec2 / vec3 / vec4 in modern renderer now work correctly

  • sound playback in the modern renderer would cut off randomly

  • Handles some hangs which could occur when using require

@sim - thanks for the update, tried out the transfer of assets single and multiple with names to a new local project folder, worked fine. Also thanks for the suggestion on spriteSize() - again worked fine.

Thanks again.

1 Like

@sim @john @jfperusse - just loaded latest beta and it crashed on me - copy of crash notes below

Just switching between projects looking for a section of code. Copied it from one project, opened the other project scrolled to the bottom of the project and deleted the remaining (—) marks at the end of the main.lua and before I could paste the copied code in Codea crashed.

Edit: repeated the above, crashed again. Closed Codea and repeated, crashed again. Each time trying to edit at the bottom of the main.lua.

Edit 2: I’m also having issues with editing this post in the forum.

@sim @john - I have noticed when opening Codea projects from earlier versions that the tabbing of code is inconsistent. It may not be a problem but I wondered if when running the code reading the parser when reading the text may have issues which could cause a crash.

Secondly, for the forum I am now regularly getting an error fired up that the editing, during writing a post, is being edited in another window. I have attached an image of this. I am writing this on my iPad and have had at least 6 of these interruptions. It also impedes the actual posting of the post. Has anyone else experienced this ?

P.s. will post the image later I am getting a different error there.

The forum errors are my fault. Trying to find a fix!

Editor crash bug will also be fixed in the next build

@sim - thanks for the update, pulling what’s left of my hair out thinking it was something I’d done.

1 Like

@jfperusse - just using VSCode to edit a project on my pad when I thought I may be able to edit a project I had shelved for a while. I had loaded it into Codea and, using the option in the latest version, transferred it to my iCloud account, when I realised I wouldn’t be able to access it from my iCloud as I was using my PC for VSCode. Then I thought I could use the iCloud app for the PC. Installed it but struggling to find a way of editing it. Is it feasible to edit on the iCloud Drive (with my PC) and view the live project on my iPad ???

Hi @Bri_G. Air Code support for iCloud projects is specifically what I am working on right now. In the meantime, I’d recommend moving the projects back as local if you want to use Air Code.

Thanks!

1 Like

@jfperusse - thanks for the feedback and suggestion, I was hoping this was on the development agenda. Good news.

On another note - I noticed you had both legacy and V4 code manual buttons on VSCode but I couldn’t get the V3 info up. Is this still in the development stage ? V4 obviously is.