Looking for description of basic Corona programming paradigm

Hi,

I’ve done event-oriented programming (mostly on the Palm), and I’m not looking for a “how-to” on Lua.

What I am looking for is tips/links/books/online-classes/suggestions on how to learn about the basic paradigm(s) underlying Corona.

I read the API, and was left wondering…does *this* call actually trigger a display of something on the screen,

or *this* call, or no call at all?  :)

At the moment, when the simulator (or a real device) chooses to actually display something seems to be a mystery to me!

thanks,

Stan (longing for the simplicity of the Palm OS :slight_smile:

Using Outlaw IDE on a Mac.

Corona SDK is frame driven. If your app is set to run at 30 frames per second (fps), we try to update the display every 1/30th of a second. If there is too much work between the last frame update and this frame update, we will finish the work before we update the frame again (this is what causes frame rates to drop).  Events trigger and make their changes, but the screen won’t update until we do the next frame buffer update.

It’s really not a thing you need to worry about too much. It usually creates problem when you try to do a progress bar, start a bunch of things loading in the same block of code and wonder why the progress bar didn’t update. The frame buffer won’t update again to show the new progress bar until that block finishes.

Rob

Hi Rob,

That would imply that everything I do is “live” … change a font size, change X or Y of a text string, and that the effect should

show up within 1/30 of a second.  But, at least with the emulator/simulator, I’m not sure I see that.    (But, that would be great!)

I’ll have to double-check my memory vs. reality!

thanks,

Stan

Yes, that’s the case.

object.x = 10 object.rotation = 180 object.x = 20

will result in a single frame update with object centered at 20.

Rob

I think that the easiest way to describe it is:

  1. Corona is event-driven. That means that when “something happens”, like a touch or rotation or incoming call or exiting the app or whatever, you can call a function as a consequence. For instance: when a button is pressed, you can call a function to deal with the button press. When a transition ends, you can call a function, etcetera.

  2. There is a special event called an enterFrame event that is executed once very 30th or 60th of a second.

That’s my gross oversimplification, but it might help!

Corona SDK is frame driven. If your app is set to run at 30 frames per second (fps), we try to update the display every 1/30th of a second. If there is too much work between the last frame update and this frame update, we will finish the work before we update the frame again (this is what causes frame rates to drop).  Events trigger and make their changes, but the screen won’t update until we do the next frame buffer update.

It’s really not a thing you need to worry about too much. It usually creates problem when you try to do a progress bar, start a bunch of things loading in the same block of code and wonder why the progress bar didn’t update. The frame buffer won’t update again to show the new progress bar until that block finishes.

Rob

Hi Rob,

That would imply that everything I do is “live” … change a font size, change X or Y of a text string, and that the effect should

show up within 1/30 of a second.  But, at least with the emulator/simulator, I’m not sure I see that.    (But, that would be great!)

I’ll have to double-check my memory vs. reality!

thanks,

Stan

Yes, that’s the case.

object.x = 10 object.rotation = 180 object.x = 20

will result in a single frame update with object centered at 20.

Rob

I think that the easiest way to describe it is:

  1. Corona is event-driven. That means that when “something happens”, like a touch or rotation or incoming call or exiting the app or whatever, you can call a function as a consequence. For instance: when a button is pressed, you can call a function to deal with the button press. When a transition ends, you can call a function, etcetera.

  2. There is a special event called an enterFrame event that is executed once very 30th or 60th of a second.

That’s my gross oversimplification, but it might help!