Codea 3.11 Beta

@sim - thanks for fixing the editor, working fine now. Also thanks for resolving forum issue, so far no problems with that. :+1:

1 Like

Hi @Bri_G! You say you’re not seeing the V3 documentation in VSCode? The V3 documentation is fetched from Codea over the Air Code connection, so it can take longer to load, and it won’t load if you are not connected. This is different than the V4 documentation at the moment since it is simply a web page. Thanks!

@jfperusse - found it thanks for the info, just need to be a bit patient when loading reference data.

@sim @john - just trying setting up a basic skeleton in V4 for a template for many of my projects.
This is what I reported on the error code:

Just loading in a basic project skeleton to generate a project, so only outline basic code written, assets loaded into project. Tried to run and it crashed on me.

Edit: I’ve been playing around with this for a while and can’t totally reproduce it. The basic issue was I loaded several image assets into a new project from one of my previous project asset folders. Then I loaded several image assets in from another folder I had placed in the Codea root myself. Trying to run that crashed Codea even when I tried to run with sprites from the Codea assets provided byTLL.

Closed Codea and tried again with Codea assets and it worked fine plus some of the assets I had linked into my project asset folder.

It looks like Codea couldn’t find some assets I had placed in the folder and didn’t trap the issue and report it then crashed.

When Codea builds up these project asset folders does it literally copy the images into a designated folder or just build a list of paths to the required assets. Note I think that the assets were added by different Codea asset listing routines. - both down the left hand of the Codea editing. Also, in one of the Codea directory asset listings I don’t think some of my own asset folders were included.

@sim @john - another oddity, this may be intentional but it is a little confusing - after the sprite crashing issue I searched through the Codea root looking for what may have caused it. All I could find were projects and a few asset folders I had placed there except for a single pdf file which I had placed there to test the loading and display of pdf documents. The pdf file was the only file visible in the documents folder access from the Codea menu and it was listed under sprites.

I realise that pdfs are loaded and displayed using the sprite command but I think there should be a pdf category in the Codea documents folder to avoid any confusion. It threw me for a while as the only pdf I was using was essentially a page of graphics. Hope that makes sense.

Edit: after a little thought I wondered why the folders in Codea root were not visible in the Documents dialogue function, it seems the obvious way to access and manipulate files.

@sim @john - think I may have picked up another issue. I built a project which was effectively on the iCloud with a range of images. I noticed one of the images was an older image which I had stopped using and had a subtly different image now to replace it. I replaced the image by deleting it from my local assets and replacing it with the new one. Both images had the same name, but when I ran the project the old image was the one used even though the image in the local folder had changed. That would suggest that we might need a refresh iCloud images for the relevant folders if images are changed within.

Does that make sense ?

Edit: Suggestion - long press on Codea project to present a list of options - one of which is to open the assets for that project to enable the addition, removal, replacement or re-name of an asset. If this could be done locally or in the iCloud this would avoid any mis-direction issues.

Edit as can’t add new post -

@sim @john - trivial issue but - if you have multiple pages in your project, with long names say 6 or 7 pages. If you are editing in page 7 such that say Main is off screen if you scroll across to main and select it with page 7 off screen then you will find both main and page 7 highlighted as the current editing screen. It can give the impression that you have different code in main.lua.

Happens in both V3 and V4.

Trivial I know but low priority fix needed.

@sim @john - just loaded the sprite animator from Webrepo which ran OK, but I tried to delete the sprite sheet and replace it with another. After selecting that resource and pressing to delete Codea crashed.

P.s. On reloading the sprite sheet had been deleted and I managed to add another which ran. Modifications were needed in the JSON file so I added a new blank json file and tried to edit using the icon on the file but it wouldn’t open the file. The file is a blank file but I thought tapping on the edit button would either open the file for editing or fire up an error message. Long time ago since I edited JSON files like this, I was expecting an in house editor or a request to “open in ….”.

@Bri_G Thanks you for using the Sprite Animator I made. I think the problem you are having is because you are using the normal version of Codea and not the beta. So in the beta it recently fixed the way to edit the file (it is broken in the normal version of Codea) and recently remove the max image size from 2048 x 2048 to something much bigger so that might be the reason for the crash since the sprite sheet that I used to above that limit. The next update is coming soon so it might fix those issues. Also if there are any feature you want me to add to the sprite animator please let me know.

Thanks.

new beta invite link please?

1 Like

Hi @Amber - don’t know what’s happening here recently, I’ve also lost the beta access. You may do better raising this on the discord forum as that is more heavily involved with development of the beta.

@sim - V3.11.2(472), not sure if this is as designed but I was running a project and wanted to take a snapshot to use for the project icon. I wanted to capture a moving object at a particular stage so I pressed pause and the screen froze. But, on trying to then capture the frozen screen by tapping the options button, it didn’t respond, only the pause button worked. I think it would be an advantage if the options menu button also worked to avoid having to try to capture several images to get the one you liked.

@sim @John - the touch.state of MOVING is not highlighted in the code. Noticed this on my recent post to killer.jo.

Edit: @sim @John - crashed Codea latest version today a few times, last one I submitted a crash report - attached the following text here from that

Having trouble with Touch - I have always thought that MOVING was one of the reserved words for the Touch command and reported it recently on the forum as not being emphasised. So I dug out the documentation and an old demo by Loopspace. Copied the demo into Codea and had to reformat entire demo as the text formatting was all over the place when I loaded it (has the editing format for Codea changed significantly?)

Ran the demo - didn’t seem to work properly so started to cut and paste sections into separate tabs. Ran it and Codea crashed.

Question - I was trying to detect a long touch on a button so I included MOVING in the code, is there a simple way of determining if a touch is extended ? Do you read the touch number and check the touch state to determine the length of the touch ? Would a touch.state.id = active or true achieve it ?

p.s. the forum doesn’t allow more than three posts without a reply, is three enough ? Especially since they may be three different unrelated posts.

Another point whilst playing with the loopspace code. - the code I copied was text. After pasting in the code to a new project and editing it so it ran I tried to duplicate it in case of problems - when I tried to duplicate it it came back with an error saying the project couldn’t be saved as a project with that name already existed. I tried changing the new file with an appended number several times with the same result. When I looked at the project file listing page there files were present with all the numbers I tried which raised the errors. Could this be related to files created being from the old loopspace text file ?

@sim @John - after last three crashes I shut down iPad, restarted, loaded Codea, loaded older running project, created a new page, tapped on new page, tried to edit and Codea crashed.

Could the loading of the old Loopspace project have overwritten Codea do I need to delete Codea and re-install ?

p.s. found the MOVING definately has some function in Codea.

P.p.s. May be unrelated but I installed the latest beta on my older iPad and when I ran Codea on that trying to install the same Loopspace text file Codea ran very slowly.

Curious as to which of my code you were trying here, if it’s something useful I could upload it to webrepo. Also happy to try it out on my ipad to compare.

@LoopSpace - it was from an old gist, a very long project with copious notes. I copied in raw mode and pasted into Codea. I then had to make a few edits before running it.

Just for clarification - the gist was designed to show all the features of the touch command.

p.s. note my issues are on the latest beta and I think your demo is probably the best coverage of Codea touch.

1 Like

This one?

@LoopSpace - yes that’s the one.

@sim @john - Codea crashed again after removing the app from the app workspace and re-installing with TestFlight then ran again, loaded a project, added a page then tapped on new page screen. Typed the - symbol and Codea crashed again (lost my working projects from the Codea screen in the process). Reported again through the crash system. Has anyone reproduced this ?

@sim @john - another crash wth 3.12 (473), recently a project involving several extensions to Codea was posted (can’t remember details) I saved it as Codea plus. After re-installing Codea I lost my latest projects except those in iCloud !!! One of which is Codea plus. When I tried to load Codea plus then Codea crashed immediately after loading the first code page.

@sim @john - is there any way to load a previous beta ? Could you repost 472 as 474 ?

Thank you for reporting all this @Bri_G. You can load an old version by tapping “Previous Builds >” in the TestFlight app

@sim - thanks for the prompt, never had to do that before. Good luck with resolving the 473 issues.

@sim @john - just for your info, I have two iPads of different gen and screen size so I can test code in different res’s. I tend to have most of my projects on both but not synced so not identical. When 473 was re-installed I lost most projects, except those on iCloud on my main pad. Fortunately my other pad (both had 473 on) I didn’t re-install 473 on which meant I could upload all my projects that I had lost onto my main pad again - benefits of iCloud.
But, unfortunately all the assets I had present in my older iPad were not present.
The point is trying to run one of those projects crashed Codea as none of my asset directories and asset files were present. Does Codea fire up messages for absence of asset directories ?