Happy Birthday Corona: Still fun after all these years

Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0

This week marks the 3 year anniversary of when I first started writing Corona SDK‘s first lines of code. It’s quite humbling to think how far we’ve come since those precocious times.

For fun, I took a nostalgic look back through our code base and grabbed screenshots of what Corona looked like in its infancy. I also went back through sample Lua code and (re)discovered how much Corona has evolved since those halcyon days.

When I starting designing Corona, I thought a lot about our experience working on Adobe’s Flash Lite, especially the actual process of shipping software for mobile. Those (pre-iPhone) days were what I call the dark ages of mobile software development because development was not just difficult; it was an endless cycle of pain.

So I knew that it wasn’t enough for the technology behind Corona to support insanely great apps. The real challenge was to package everything up so that people would find it simple and enjoyable to work with.

Early Corona vector rectangle demo (circa May 2008)

I wanted the developer experience to be insanely great, because if the developer experience was awesome, that meant the developer had more time to make the end user’s experience even more awesome.

The first significant milestone was getting the rendering engine to display rectangles (right) in what would ultimately become the Corona Simulator. At this point, I hadn’t yet gotten around to adding device skins, so it’s just rendering OpenGL into a plain Cocoa NSWindow.

Now here’s the really interesting part. The Lua code looks nothing like the modern Corona API — just a couple of global functions:

[cc lang=”lua”]local r1 = drawrect( 10, 50, 30, 30 )
setblue( r1 )
local r2 = drawrect( 300, 100, 80, 80 )
setgreen( r2 )[/cc]

As you can see, the display library and the notion of display objects didn’t exist yet.

Early Corona rectangle animation demo (circa May 2008)

The next major milestone (right) was adding support for alpha blends in the OpenGL engine and adding a timer loop for animation that would periodically call a Lua listener. By this point, I had settled on the name “display” for what’s now our trusty display library, but I hadn’t quite settled on the event model.

The following is the basic code that handled what is now known as “enterFrame” events (minus the setup code that randomly positioned the rectangles and randomly assigned color). Incidentally, this was the proto-code for what would ultimately become our Fishies sample app:

[cc lang=”lua”]list = {}
width = display.stageWidth;
height = display.stageHeight;

function onSystemEvent( key )
for i = 1, #list do
local item = list[i]
local r = item.r
local dx = item.dx
local dy = item.dy

local bounds = r:getStageBounds();

if (bounds.xMax + dx) > width then
item.dx = -item.dx
dx = dx + width – bounds.xMax
elseif (bounds.xMin + dx) < 0 then
item.dx = -item.dx
dx = dx – bounds.xMin

if (bounds.yMax + dy) > height then
item.dy = -item.dy
dy = dy + height – bounds.yMax
elseif (bounds.yMin + dy) < 0 then
item.dy = -item.dy
dy = dy – bounds.yMin

r:translate( dx, dy )

The original idea in this code was to have a designated global function called “onSystemEvent” to handle all events where the type of event was determined by the string value of “key”. I soon realized this was too simple, especially when it came time to add support for touch events which were driven by user interaction, not by underlying system events.

Fishies ('Finding Nemo') demo app (circa June 2008)

Funnily enough, when Carlos and I demo’d these bouncing rectangles on the iPhone, the folks who eventually became our VC’s were thoroughly unimpressed. It was only until they saw images that they started to see the potential.

Of course, back in those days investors still thought in terms of the operator walled garden. Our VC’s were a little more savvy but still questioned the commercial viability of apps, so I had to pitch this demo as an app that a company like Disney/Pixar would make to promote the movie Finding Nemo.

In any case, it’s at this point that our venerable image API finally makes its appearance:

[cc lang=”lua”]display.newImage( “aquariumbackground.jpeg”, 0, 0 )[/cc]

Corona simulator with iPhone skin (circa Oct 2008)

Embarrassingly, it would be months before I got around to skinning the simulator window. During those intervening months, I ended up spending a lot of time on under the hood enhancements, getting parity between both Mac and iOS builds, and even getting a port on Nokia’s ill-fated Symbian Series 60 platform among other things. But it wasn’t until device skins were added did the Corona Simulator really feel like a simulator.

At the time, it was hard to imagine how far things would go. When Carlos and I connected with the folks at ReallyMedia/HDInteractive, they created the first Corona-based app and in the process showed us things we didn’t think were yet possible with Corona. It was at that point that we realized we were onto something really special.

When our advisor and fellow Adobe veteran, David Lazarony, test drove Corona in its early days, he expressed similar sentiments:

What is so great about Corona is it is so easy to just write code and get things working. You immediately see your results on the screen. That is what was so great about Applesoft or Logo. But they were just toy graphic languages. Yours is first class.

I hope you feel the same way today.

Happy Birthday Corona!

Share on Facebook0Share on Google+0Tweet about this on TwitterShare on LinkedIn0

This entry has 18 replies

  1. Yes, happy birthday. Have some pieces of good cakes. It’s great to see the beginnings of Corona.

  2. David says:

    HaPpY Birthday. Continue on your line, you make many people happy

  3. Jayant C Varma says:

    Happy Birthday Corona, can we get the early Simulators? That is the MacOSX build so as to say, isn’t it? I am sure there will be many more features added to it and there will be many more B’days to celebrate.

  4. Dtaib says:

    Happy Birthday Corona!

  5. iWalter says:

    You are the best fathers that baby Corona could ever have asked for 🙂

    Walter, you and Carlos should be on the cover of Parent magazine.

  6. Take care guys!

    We need you!

  7. Alen says:

    Happy Birthday! Thank you for making it so easy for us to develop!

  8. Happy birthday, Corona. Funny how you worked to get the skins on the Simulator, and people like me are now asking you to remove it (at least optionally) for the sake of gaining real estate on smaller resolution screens like on my MacBook Air. What a long way you’ve come to get to this point, and to think you’re almost halfway there! LOL

  9. Magenda says:

    Each time I see Walter posting something, I can’t resist of thinking the following analogy:
    Walter = Woz
    Carlos = Steve


    Happy birthday, Corona!

    Keep up the good work…

  10. eaguirre says:

    Happy Birthday! Corona

    Feliz Cumpleaños! Corona

    Joyeux Anniversaire! Corona

    Bonne fête à toi! Corona

  11. Carlos Icaza says:

    And what’s more interesting to note, the Corona moniker came really really late in the game. The codename, as you all know was “ratatouille” and peppered throughout the code and files and a ancillary libs ect, have names that either begin or end in RTT as in “RaTaTouille”.

    Walter and I spent numerous hours going over possible product names… to the point we were looking up names of “bolts” for the space shuttle as possible product names.

    LaunchPad, Genesis, Leika, to MLP (Mobile Launcher Platform) the Space Shuttle transporter from the hangar to the takeoff plaza, just to name a few.

    It has been quite a ride, and as always, we thank *you* for trusting your apps with our Corona SDK.

    And contrary to popular belief, we did not name it Corona after the beer, rather, after solar flares, to compliment “lua” which means moon in Portugese.


  12. Ed Johnson says:

    Happy Birthday, Corona SDK!

    Thank you for making possible for us as mobile developers to develop cross-platform apps on iOS and Android. It’s awesome and fabulous. I’ve made the right decision to follow your roadmap.

  13. J. A. Whye says:

    Very cool look back at where Corona came from — thanks for the trip down (your) memory lane!


  14. Antheor says:

    “The real challenge was to package everything up so that people would find it simple and enjoyable to work with.”

    I know you know but just to tell it loud : you made it !

    That’s why Corona is like no one else, you know what is the real challenge.
    Thx for opening me the gates of mobile development.

  15. Fu says:

    Happy Birthday!

  16. Mark Sigal says:

    Happy Birthday, guys. Great progress to date, and plenty of jaw-droppingly cool accomplishments in the not too distant future.

  17. Mike says:

    My dream would be to see Carlos Santana appearing there with Carlos on stage with the guitar in hand performing his greatest hits while Carlos sings in front of thousands of developers.

  18. Shaun says:

    Happy Birthday. Great Jobs guys.