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
Category: 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
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
NOTE: This tutorial is outdated and has been replaced by a newer Using Custom Fonts tutorial.
Want a quick fix that will prevent text from being blurry on “retina” displays of any kind? Simply paste the following code at the top of your main.lua file (or put it in an external file and require-it in): What the above code does is override the built-in display.newText() function to ensure that text is displayed cleanly with no blurring on retina-enabled devices. It has no effect on older, non-retina display devices. The best part is, once you put the above code in your project, you can just keep using display.newText() as you always did! Talk about a quick fix
In Corona, you use the Lua programming language to do everything. Thus, it’s equally as important to understand Lua as it is to understand the individual Corona-specific concepts and API’s, such as the Event Model we went over last week. One common source of confusion comes with one of Lua’s most powerful features: Tables.
We’ve always told mobile game and app developers that Corona SDK is simple and fast. And right here, we’ll show you! Below, Ansca Mobile team engineer Edgar Miranda (we told you he was talented!) walks you through, step-by-step on how to make a Breakout-style for iPhone in under 15 minutes and 150 lines of code. Don’t believe us? Check out the tutorial below and the sample code at GitHub.
The Corona SDK section over at Mobiletuts+ is always full of great tutorials. And below, you’ll find a tutorial that especially caught our eye, as we know many of you Flash developers will dig it! This three part tutorial takes a look at porting a Flash/Flex game to Corona SDK. Specifically, it walks you thru porting from ActionScript to Lua, with the end goal of playing formerly Flash-only games on the iPhone and iPad. Along with demonstrating language and API differences, the tutorial also accounts for hardware restrictions such as screen size and lack of physical buttons on the iPhone. So, without further ado…
Don’t you just hate it when you’ve built and submitted the greatest app of all time, only to have the App Store reject it? What a BUZZKILL! Luckily, in our latest update of Corona, we’ve now equipped your friendly neighborhood SDK with the power to test your build against Apple’s validation requirements. This way, you’ll know whether or not it can be approved for the App Store before you upload it and wait several days in high anticipation. Let our very own Eric Wing show you the ropes:
Previous App of the Week winners Yobonja! (exclamation point included) just submitted their latest title to the App Store, the upcoming Tap Party 2. The game was simultaneously created for iOS and Android, which Yobonja attributed to Corona’s fast content scaling ability across multiple platforms. Since we’ve been seeing a lot of questions about precisely that lately, we thought we’d provide past links to content scaling tutorials that we’ve done. Corona SDK: Content scaling made easy Corona SDK: Dynamic image resolution made easy Use dynamic layouts in universal builds with Corona SDK Also, if you wanna see how Yobonja! utilized the above tutorials in the making of Tap Party 2, you can check out their blogpost chronicling the process below.