Codea is weird after update!

Bugs i found after update:

  • Codea crashes sometimes
  • mic does not work
  • Reference search bar is weird
  • SupportedOrientations does not work

EVERITHING IS WEIRD

Codea isnt fun anymore after this fvxcking update!

@Silvio2400

  1. Codea crashes don’t occur that often, for me anyways.
  2. Mic does work. See an example I posted in Codea 3.0 ver (108) …
  3. Reference doesn’t work the way it should, but it’s still useable.
  4. SupportedOrientations hasn’t worked for about a year, but that doesn’t stop you from coding.
  5. Codea is still fun. You just have to concentrate on everything that works and ignore the few bugs until they’re fixed.
  6. Everything you mention has been happening in the previous releases, not just since the latest.

@Silvio2400 What version of Codea are you running. I’m on the latest beta version which might have things fixed that aren’t fixed in the normal version yet. @Simeon @Silvio2400 might have a point. While you’re adding more advanced functions to Codea, you’re kind of ignoring some of the minor things that the new or normal users are running into. SupportedOrientations hasn’t worked for a long time and you haven’t replaced it with something that does or we don’t know about it. As for the reference, tapping a word and selecting reference doesn’t work the way it should. Sometime it finds the reference, sometimes it just highlights the top level of the section. Other times it takes you to the wrong reference because there’s multiple words the same. Sometimes the wording in the reference doesn’t wrap to stay within the reference area. The Codea editor does crash every now and then for me, but I’m just used to it. A lot of this doesn’t bother me because I’m more into the beta roll, so I’m looking for problems. The normal user might find things annoying because they want everything to work the way it should. Apparently Silvio2400 is one of them.

@dave1707 I totally agree.

@Silvio2400 would you be able to help me out by describing a bit more about each issue. I’ll try have them fixed by the next update.

supportedOrientations will likely be deprecated in the next release. iOS no longer uses orientations except as a fixed build setting in Xcode.

Oh noes! I hope that doesn’t mean we’ll no longer be able to use device orientation in the future. I use it all the time to lock it in the current state.

if i do mic.start() it works for a few seconds then doesnt work anymore!
suportedOrientations always worked for me until THIS update!
it crashes TOO MUCH since THIS update idk why

@Kirl I use supportedOrientation a lot also. I’m hoping that something else will be used instead. Right now when I post examples, I have to put in a comment to let everyone know which way they should hold the iPad.

@Silvio2400 When you do mic.start and it works, do you also use the sound() command. There’s a problem using the mic and sound commands together that’s been fixed in the next release. If that’s not the case, can you post a small example of your code that causes the problem.

@Silvio2400 Here’s a mic example that I have no problems with. Try this and let me know if you have a problem with it.

function setup()
    fill(255)
end

function draw()
    background(40, 40, 50)
    text("tap screen to turm mic on or off ",WIDTH/2,HEIGHT/2)
    text("mic amplitude",WIDTH/2,320)
    text("mic frequency",WIDTH/2,220)
    text(mic.amplitude,WIDTH/2,300)
    text(mic.frequency,WIDTH/2,200)
end

function touched(t)
    if t.state==BEGAN then
        m=not m
        if m then
            mic.start()
        else
            mic.stop()
        end
    end
end

@Kirl @dave1707 part of me wants to remove supportedOrientations because I feel like it would encourage people to not code to a specific orientation and instead just use the width and height to place things. But maybe it’s too useful?

Also, it’s terribly hard to support, new iOS updates keep breaking it because Apple has moved away from orientation-based layouts and instead uses size classes and safe areas.

I’d rather expose the new stuff in Codea — e.g., what if you run Codea in split view? Or eventually on iPhone? The days of being able to assume someone else will be using a similar device to you are starting to go away.

That said, I’m up for trying to fix supportedOrientations for now.

@Silvio2400 the mic issue will be resolved next update, sorry about that. Please keep reporting crashes (especially if you can reproduce them somehow, those are the best).

@Silvio2400 @Kirl @dave1707 I have bad news — I just looked into why supportedOrientations stopped working with this release and it’s because we now support split-view and slide-over on iPad.

Codea used to require the fullscreen. You couldn’t make it smaller by dragging another app next to it. But we want to make Codea work well with other iPad apps and if your app does not “require fullscreen”, iOS does not allow you to use the supported orientations system, you must support all orientations (which makes sense, since the app could be running in a whole number of configurations and sizes where orientations just don’t make sense).

I think the way to go from here would be to come up with a new API based on aspect ratios. Something requiredAspectRatio(16/9), which would force your project to run in a landscape style even if your iPad is in portrait mode (it would just be shrunk and letter-boxed running in portrait).

@Simeon I see your point for supportedOrientations. I originally thought you were getting rid of it because you were replacing it with something else. But if it’s a problem then I can do without it and code for whatever orientation the iPads in.

@dave1707 I think there is value in what it used to do, and if you export to Xcode you can still force your app to work in specific orientations. But while coding with Codea we can no longer present the runtime in a different orientation than the user is currently using — iOS just won’t allow it.

I’m going to deprecate supportedOrientations in the next release. And we’ll see if we can replace it by allowing you to specify your own custom WIDTH and HEIGHT, or aspect ratio, and that gets resized to fit whatever screen size the user is using.

@Silvio2400 I’ve fixed the reference search issues for the next update.

So the changes will be

  • supportedOrientations removed (with a solution to come later, sorry!)
  • mic issues resolved
  • fixed tint color over-multiplying when used with image-based-sprites rendered with setContext
  • undo and redo improvements in the code editor
  • search in reference issues resolved
  • fixed duplicate Material packs showing in the asset picker on each project run
  • fixed crash in asset picker when showing a blend file with no geometry
  • fixed sound playback preventing microphone API from functioning
  • fixed music playback being stopped when Codea first starts

Hopefully we can get Codea back to feeling good for you to use.