Behold… The ‘Samurai Fruit’ sample code!

Posted by & filed under Tech.

Less than two weeks ago, we told you about our Code Exchange where we post the latest, and most coolest Corona sample code known to mankind. Now, we make another addition to the esteemed halls of the Code Exchange. Behold: The almighty Samurai Fruit! Check out this and a bunch more sample code here — ya might wanna bookmark that page too!


Compositing Fun with Additive Blends!

Posted by & filed under Tech.

I’m happy to announce that we’ve added additive blend support to Corona. It’s available starting in Corona daily build #497. What’s additive blends? It’s a cool way to get glow effects. It’s also known as “Linear Dodge” for the Photoshop buffs among you. In the rest of this post, I’ll break it down into its gory details with code, math, and pictures. Whenever you’re doing alpha blends between two different objects, you’re doing compositing. By default, Corona does the standard “normal” blend which is what most of us think intuitively think of when we say blend two objects together, i.e. the painter’s algorithm. So if you use the following code, which places a transparent PNG on top of a background… [cc lang="lua"]local bkgd = display.newImage(


Happy Birthday Corona: Still fun after all these years

Posted by & filed under Corona SDK, Tech.

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


Don’t forget the code!

Posted by & filed under Tech.

Recently, we’ve seen a lot of comments on blogposts asking how to do [insert elaborate mobile app development function here] in Corona SDK. The result is usually an extensive back-and-forth between them and Team Ansca, often involving a head-spinning amount of code being cut-and-pasted into the comments section. Bleh! So, we just thought we’d let some of our newer visitors around here know about the Corona Code Exchange. It is awesome — you can find an ever-growing index of Corona coding tricks archived here, with the newest ones placed first under the “Latest Additions” banner. Click the screenshot below to snoop around, and let us know what we should add next!


Don't forget the code!

Posted by & filed under Tech.

Recently, we’ve seen a lot of comments on blogposts asking how to do [insert elaborate mobile app development function here] in Corona SDK. The result is usually an extensive back-and-forth between them and Team Ansca, often involving a head-spinning amount of code being cut-and-pasted into the comments section. Bleh! So, we just thought we’d let some of our newer visitors around here know about the Corona Code Exchange. It is awesome — you can find an ever-growing index of Corona coding tricks archived here, with the newest ones placed first under the “Latest Additions” banner. Click the screenshot below to snoop around, and let us know what we should add next!


Pathological sleep disorder on iOS

Posted by & filed under Corona SDK, iPad, iPhone, Tech.

Soon after the rollout of our new audio engine, a few of our users reported some performance problems. We believe we have fixed this performance problem, but the problem itself was actually a rather bizarre bug that seems to be an Apple performance problem. So, I thought it might make for an interesting blog post.


Using closures in Lua to avoid global variables for callbacks

Posted by & filed under Corona SDK, Lua, Tech, Tutorials, Tips and Demos.

This type of question has appeared on the forums multiple times. Basically, it goes something like this: I have set up a listener callback function. But when the callback function is invoked, I would really like access to a specific variable in that callback function. The event that is passed back to me doesn’t give me access to the variable I want. How can I access my variable? There are multiple solutions to this problem, but often using a global variable is the path of least resistance. But nobody really likes being forced to use global variables when they don’t have to. Well, I’m going to introduce a much more elegant solution that leverages the true power of Lua. If you read Programming in Lua,


"Can’t code but want to make an iPhone app? This is for you!"

Posted by & filed under Tech, Tutorials, Tips and Demos.

In the past, we’ve released some beginner’s guides to Corona SDK that have been very well received by our users, new and old. Now, we present part 1 of the Corona For Newbies tutorial, created by user Peach Pellen. Peach has condensed an excellent Corona crash-course into a set of quick sample sets to walk even the most aspiring yet code-illiterate developers through their first crucial steps of app creation. Head on over to Peach’s site Techority to get all the details on Corona For Newbies, or click the link below to download the tutorial (.ZIP file) now. Download Corona For Newbies, Part 1 Oh, and be sure to tweet @PeachPellen and let her know what you think!


Flash to Corona SDK Porting Guide

Posted by & filed under Corona SDK, Flash, Lua, Tech, Training/Support, Tutorials, Tips and Demos.

CAUTION: This tutorial is outdated and the material cannot be confirmed as accurate. A new guide covering this topic is coming soon. This article is designed to get Flash developers quickly oriented within Corona. First, I’ll discuss how to take your existing Flash projects and turn them into Corona projects, followed by a more general introduction to Corona from a Flash perspective. (1) Exporting Assets from Flash A good first step is to export all your graphical assets. When porting from Flash Lite on older devices, I generally recreated higher-resolution assets for the larger iPhone and Android screens. However, web-based Flash games will likely have assets that are already a good size for today’s mobile devices. And of course, if the assets are vector-based, you


Corona SDK Tutorial: Polygon point reduction with curve-fitting

Posted by & filed under Corona SDK, Tech, Tutorials, Tips and Demos.

Using a variant of the Douglas-Peucker algorithm in conjunction with the curve-fitting algorithm by Philip J. Schneider found in Graphics Gems I, Carlos wrote this in Corona SDK using nothing but the Corona framework to draw, reduce points, and convert the resulting polyline into a series of cubic bezier curve segments. Sample code coming soon! (you can bug Carlos if you want it immediately, though)