From the Forum — Issue #103

From the Forum — Issue #103

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!

Old-fashioned device detection

In some cases, it’s essential to know what type of device upon which your app is running. Knowing this simple fact can help to distribute horsepower and screen real estate, so that your game looks fantastic, no matter which device it’s running on.

Completely fool-proof device detection is still a bit of a guessing game, leaving Corona SDK developers to create our own method, involving a few different checks available to us from existing APIs. A few useful options are outlined in the forum thread below. Head on down to take a look and see for yourself!

Calculating dynamic velocity

It’s always interesting when you start working on a project requiring calculating trajectory and, like me, you never bothered to stay away during Trig class. It’s true what they say, kids, you should always pay attention in math class!

Fortunately, those of us who feel asleep in school, can be helped out by the geniuses that make up the Corona developer community. The below thread talks a bit about how one can calculate the velocity required by an object to reach a certain point on a parabolic curve. Click through to the original thread to see what I’m talking about, and to grab some tips for yourself.

Keeping directories tidy

In the vast amount of cases, app file maintenance is an essential evil. Managing where files are created and housed, between system.DocumentsDirectory, system.CachesDirectory and system.TemporaryDirectory. If you’re not careful, bad management can lead to a drastic increase in app size, and a diligent use could see the large amount of storage your app needs, and decide to uninstall it on the spot. Always a bad scenario.

Enter the below thread. One Corona developer decided to head this issue off at the pass, and find out how to completely wipe a sub-directory they created when using certain assets. The solution leverages the terrific GGFile module from Glitch Games, which has been in existence for quite some time, and proves itself to be incredibly useful one again! Truck on over to the original thread to find out more about this pretty sweet tip.

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.

Rob Miracle

Rob is the Developer Relations Manager for Corona Labs. Besides being passionate about helping other developers make great games using Corona, he is also enjoys making games in his spare time. Rob has been coding games since 1979 from personal computers to mainframes. He has over 16 years professional experience in the gaming industry.

No Comments

Sorry, the comment form is closed at this time.