(Part 5) Automated Testing on Android Devices: Bringing everything together through shell scripts

Posted by & filed under Android, Corona SDK, iPad, iPhone, Lua, Tutorials, Tips and Demos, Videos.

There has been a lot of material presented over the last four parts. In this final part, we will finally go into some detail about our automated testing system for Android. We will also finally get an opportunity to bring everything together by looking a little more how our shell scripts orchestrate the test run and connect components from the previous parts. Android was a lot easier to setup automated on-device tests than iOS because the entire toolchain is command line driven. But ironically, actually running the tests has been more unreliable for us, mostly due to some bug related to adb. For some reason we can’t explain, adb will hang on us and it will not allow us to communicate with our device. This has


(Part 4) Automated Testing on the iOS Simulator: Scripting Bridge/LuaCocoa & System Events

Posted by & filed under Corona SDK, iPad, iPhone, Lua, Partners, Tech, Tutorials, Tips and Demos, Videos.

We allow Corona developers to also build for the Xcode iOS Simulator. Sometimes the simulator is preferable to our Mac or Windows simulator because the Xcode Simulator behaves more like a real device. Since we officially support the Xcode Simulator, we run our automated tests on the Xcode iOS Simulator to help verify our stuff actually works. While we could theoretically reuse the same process of scripting Xcode that we described in Part 2, we opted for a slightly different approach. As described in Part 2, Xcode 4 broke everything so we didn’t want to put this in the same critical path. Furthermore, Xcode 4 has some very nice speed improvements and reduces our build times to almost half. So instead, we simply use the command


(Part 1) Automated Testing on Mobile Devices for iOS and Android

Posted by & filed under Android, Corona SDK, iPad, iPhone, Lua, Tutorials, Tips and Demos, Videos.

Preamble: This post is going to be a little different than usual. What we present here is behind the scenes stuff used in making the Corona SDK. But we hope the information presented here goes beyond satisfying simple academic curiosity. We hope this information will actually be useful for others to directly use in their own projects. And the target audience for this post goes beyond our normal demographic. In addition to Corona developers, we are also reaching out to all Xcode/iOS/Mac developers, all Android developers, all Lua developers, and anybody interested in automated testing/software reliability. Also, as a consequence of our solution, people interested in Applescript, Scripting Bridge, and/or LuaCocoa may also find things of interest. Because the topic is vast, not every single


Solutions to Common Physics Challenges

Posted by & filed under Tutorials, Tips and Demos.

As you already know, Corona includes the powerful Box2D physics engine to give your games the ultimate sense of depth by providing a high-quality, realistic physics simulation — all without you having to know much more than just the “common sense” aspects of physics. Generally, if you know that gravity makes things fall, and understand that heavier objects travel slower than lighter objects when an equal amount of force is applied, then your knowledge of physics is sufficient enough to make a great physics-based game using Corona. Piece of cake right? However, because there are several properties that affect how things behave—things we never really have to think about in the real world—sometimes your in-game physics don’t always behave exactly how you expect them to,


Tutorial: Basic JSON Usage

Posted by & filed under Tutorials, Tips and Demos.

This week, I’m going to cover a web technology that has been dubbed “the fat-free alternative to XML” — JSON. While XML is great, there are a few problems with it… Because XML tags on the same level can have the same name, accessing XML data from Corona can get to be really confusing if you don’t pre-localize all the children in each level of the node hierarchy with your own naming convention (very confusing). It’s really only useful if you need to read-in data from an XML file. If you need to package up data into an XML file from your Corona app, you’re in for a rough ride. Thankfully, using JSON in a Corona app is a lot more practical and the functions are integrated


How to use XML files in Corona

Posted by & filed under Tutorials, Tips and Demos.

There are countless reasons why you might want to use XML files in your project, including (but not limited to): Storing level data (to be handled by other functions in your project). Saved user information (or game state) for later loading. Storing app settings for later loading. Using XML files as a simple information database for your app. Pulling RSS feeds (XML files) from the web to display in your app. Storing eBook page data so pages don’t have to be hard-coded. If you’ve never used or worked with XML, then this article may open your eyes to how you might take advantage of the technology. Or, you may already know and use XML regularly and are looking for a good way to extract the


The secret/undocumented audio APIs in Corona SDK

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

A few months ago, the developers from Yobonja (who made hits like Blast Monkeys) posted they discovered a ‘Hidden Audio Module’ in the Corona SDK. Since Daily Builds have been temporarily suspended until Aug 2, this seemed like a good time to talk about the secret/undocumented audio APIs in Corona to give you something to play with in the meantime. But before I go on, let me set up the disclaimer and ground rules. Disclaimer The features I talk about in this article are untested, unsupported, and we reserve the right to remove these APIs at any time. Use at your own risk. We do not want these features to be support issues for us, so do not send us bug reports with code using