Codea 2.5.1 (97)

@Bri_G I will try to reproduce, does video recording work for you?

@UberGoober the Find/Replace crash has been fixed. I was using an iOS 10+ only API. Reverted to an iOS 9 compatible API. It hasn’t made 2.5.1 (that’s “In Review” atm with Apple), but it will make the next update.

Video - I find a little messy - first try it recorded a snapshot to the photos app. The icon going red screen cleared until icon pressed again. Then it opened a play window from which you can save or export (note the text and export options are faint could they be enhanced by line thickness darker colour or button?

The returned to normal screen tried recording second video (without exiting the app) and the play window opened icon not red. Looked to save again OK. Repeated several times and eventually Codea crashed. Probably be better to replay videos in photos app the replay screen can be confusing. Mentioned this before and someone pointed me to the iOS recorder.

@Bri_G hmm I think we are just presenting the standard iOS screen recording interface at that point in time. It’s supposed to have advantages over our old recording method: records sound, captures the full UI, records at higher frame rate. But it seems like there are some issues.

@Simeon looks like a good package, might be associated with full exit of the iOS sub program before releasing control to Codea. Did you see my note and issue on the control panel on the bottom right hand corner of the screen, a single pause button opening to a toolkit record/snapshot/etc could be a better option avoiding a clash with the multitasking slide up window and allows a springboard to further options.

@Bri_G I did see that, but I’m not sure how the buttons in the bottom left would clash any more or less than a single button in the bottom left corner?

(What’s the multitasking slide up window?)

@Simeon that’s the app bar which allows you to tap and switch to different apps without double tapping the home button. I kinda like that but it’s easy to pull up if you are stroking near the bottom of the screen so some of the buttons in the bottom left hand corner can be misinterpreted by the touch sensing. The bar takes up quite a lot of the lower screen real estate.

@Bri_G oh yeah I know what you’re referring to

I’m trying it out now and the tap vs. swipe from screen edge are quite distinct. I’m not able to swipe a button and accidentally invoke the dock. Though maybe I just need to try it out more.

while on the topic of screen capture!..another plea to save the screenshot in .png format, so as to preserve the alpha channel.

@Simeon yay! You found it and fixed it, yay.

On the subject of swiping near the edge of the screen:

I’ve been running into a recurrent issue that’s troublesome. If I have a slider whose value starts at the leftmost position–say it ranges from 1 to 10 and the default is 1–very, very often when I try to slide the slider I end up swiping the whole project closed and being dumped back into the editor.

I wasn’t even aware of swipe-to-close-project before this conflict arose, so I certainly wouldn’t miss it if it was gone. Would anyone else?

@Simeon you are probably right, I just need to be more careful when I’m using it. Although if Apple continue adding features around the screen edge we’ll have to limit our in app interactions to a rectangle near the centre!!!

@Simeon How does blendMode work for craft materials?

In order to get alpha to work, I appear to have to set material.blendMode = NORMAL. However, when I did that (on a complicated project), I got black traces of other objects on the screen.

Doing a bit of printing, I see that the default blendMode on craft.material is not one of NORMAL, ADDITIVE, or MULTIPLY but has constant 3. I’ve tried looking at the shader, but I can’t see the effect of that (I can see stuff like ENVMAP_BLENDING_... which I presume is what blendMode sets).

So there seems to be something happening to all materials when I set the blendmode on one material.

Maybe there’s a different way to do what I’m trying to do. What I have is a plane with a map which has some alpha, and I want that alpha to be noticed. I know that with meshes, we had to be careful with drawing order to ensure that alpha worked as it should. What’s the equivalent with models?

@Simeon Here’s code to reproduce the blending mode stuff:

function setup()

    scene = craft.scene()

        cam = scene:entity()
    cam.position = vec3(0,5,7)

    ball = scene:entity()

    ball.model = craft.model.cube(vec3(1,1,1))
    ball.material = craft.material.preset("Surfaces:Basic Bricks")
    -- ball.material.blendMode = NORMAL
    ball.position = vec3(0,0,6)

    shadow = scene:entity()
    shadow.model = craft.model.cube(vec3(1,1,1))
    shadow.position = vec3(-1,0,7)
    local mat = craft.material("Materials:Basic") = "Cargo Bot:Codea Icon"
    mat.blendMode = NORMAL
    shadow.material = mat
    crot = quat(1,0,0,0)
    crot.x = 1/math.sqrt(2)
    crot.w = 1/math.sqrt(2)
    cam.rotation = crot


function draw()

I get a black square in the middle of the screen. It goes away if I comment out the mat.blendMode = NORMAL line, or uncomment the ball.material.blendMode = NORMAL line.

(Incidentally, when I exported this project as a zip file, it included some deleted tabs.)

I just realised that this was actually on the published version of Codea. I’ll check on the beta.

@LoopSpace this sounds like a rendering state bug. If you send me a project that causes this issue I can debug it.

@John Is the code I posted just before your reply sufficient?

for me, the commenting out of a section of code using - -[[ and - -]] does not show up as green in the editor anymore. Nevertheless the code is disabled.

@LoopSpace Hah, I missed that!

@Simeon This is no big deal, but I’ve noticed this several times but haven’t been able to recreate it at will. Sometimes when I open Codea, it will show me the screen from a program I ran maybe several days ago, then show me the list of projects or the text of a project I was in depending on where I was when I previously closed Codea.

@Simeon I’ve been able to recreate the issue mentioned above.

  1. Open a project in landscape mode and run it.
  2. Use the finger squeeze on the screen to close Codea.
  3. Open a different project in portrait mode and run it.
  4. Use the finger squeeze on the screen to close Codea.
  5. Rotate the iPad back to landscape mode and open Codea.
  6. You should see the screen from the first program and then the screen from the second program.

@dave1707 what this sounds like to me is that iOS has killed the app but the last screenshot preserved had your open projects. So it shows the screenshot of the last state while Codea is reloading, then replaces it with the project browser screen. I’ll try your steps and see if I can confirm that.