From the Forum — Issue #81

From the Forum — Issue #81

From the ForumWelcome to the latest installment of From the Forum. In this series, guest blogger Alex Jackson highlights outstanding threads from the Corona Forum. The goal is to bring attention to the most captivating, interesting, and thought-provoking discussions taking place in our very own backyard.

Please visit the forum to join these conversations or start your own!


1. Checking changes on the fly

I’ve talked at length about how useful it is to download asset files after your app is installed, rather than including every single item in your payload. Getting your assets over WiFi makes your app a bit more attractive when your potential users are out on the town and want to download your app over their mobile network.

However, this can present a slight issue. How do you know what the user has downloaded, and to which subdirectories each asset went? Checking download progress, destination and completion is arguably the most popular option. But, wouldn’t it be cool if you could let the download function do it’s thing, and check your directories and subdirectories after it’s completed?

A Corona developer had a similar question, wanting to dynamically catalogue the contents of a folder. That’s when game developer extraordinare StarCrunch showed up on the scene and provided a link to his fantastic Corona library, hosted on GitHub. It includes some really amazing tips, so do yourself a favor and head to the original thread to check it out!

https://forums.coronalabs.com/topic/57875-reading-images-from-a-folder/

2. Niche use alert: LFS through CoronaCards for Windows Phone 8

Here, we have a great post that, while immensely useful, might not reach the audience that it needs. And that’s where FtF comes in! I saw this post recently and couldn’t help sharing the ingenuity of Spacewolf. They really needed to use some basic functionality from the LFS (Lua File System) library from Corona. Unfortunately, LFS isn’t available for Windows Phone 8 through CoronaCards.

So what did he do? Well, he asked the community whether anyone had any code he could reuse. In less that 24 hours, they had written a module themselves, and one that could be used by any other developer with a similar need. Very gracious, so if you have a need for this kind of functionality, please proceed to the front of the class and click the link below.

https://forums.coronalabs.com/topic/57371-has-anyone-written-lfs-substitute-code-for-wp/

3. The spoils of orientation

One of the first things you learn to interact with, when you start experimenting with Corona, is setting and changing the orientation of your app. It’s fun to spin your device around seeing how your content would acclimate to the new size. Inevitably, however, you’ve got to get down to business, which usually means you have to settle on either landscape or portrait.

One developer wasn’t going to be pinned down to one orientation, however, and set out to have their app support every orientation that could be thrown at it — but they were running into some issues getting the device to understand when it was rotated and when it wasn’t, along with which orientation it was in at all. Fortunately, Corona support engineer Brent Sorrentino provided some assistance, and the byproduct is some well-tested code that shows some best practices for incorporating complete orientation support. Head on down to the original thread to grab this snippet and add it to your utilities today!

https://forums.coronalabs.com/topic/57764-systemorientation-ios-override/


About Alex

Alex Jackson is an indie developer and the founder of Panc Interactive, specializing in retro-style gaming. He has created several mobile applications, enjoys long walks on the beach, pixel art, and reading the Corona forums. Contact him by email or follow him on Twitter: @pancinteractive. Check out his new game Segreta on iOS, Android, Windows Phone and Amazon devices.

alex
No Comments

Sorry, the comment form is closed at this time.