08 August 2014
From the Forum — Issue #32
Welcome 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. Memory testing modules
Your game is done! It’s all finished! Hooray! You’re very excited and you can’t wait to do some real testing and evaluation. Now, you’re playing through, and every time you go to a new level, the game gets slower and slower. The framerate seems to be lowering and the game is going at crawl. What’s wrong!
It’s the age-old necessity faced by every game developer. Optimization! Finding memory leaks in your code is paramount when making sure your game is going to go the distance when the masses start putting it through its paces. Developer roaminggamer is at it again with some really nice tips for testing your code for memory leaks. Other devs chime with additional tips to keep your code tidy and the performance manageable.
Go and check it out for yourself. If you have any more tips, please let us know!
2. Leaderboard troubles
Consider this a Public Service Announcement to broaden awareness when generating leaderboards for Android. There are so many ins, outs and what-have-yous in the process that you can easily miss one or several steps and end up confused and frustrated.
I’ve included a few different threads that bring up potential pitfalls around the Android Developer Console, SHA-1 hashes and debugging your code calls through the Android log. For recommended reading, please see Rob’s tutorial on Google Game Play Services setup, and the Principles for Basic Debugging. Happy coding!
3. Getting string numbers from tables
Using JSON strings in Corona is a great way to get started with database development, helping to lead developers down the path to more sophisticated and involved apps. Getting started is easy and there are so many resources to learn that you can’t go wrong.
An interesting question came up in the forums regarding how to identify and modify specific variable sets. The variable values don’t have anything in common, but the variable names do. Seems like an impossible situation, no? Well, distinguished Corona developer Caleb (he of Dusk fame) had a solution that fit like a glove. Using our handy k, v in pairs function handler, you can use the sub API to check a pre-set “prefix” for the variable name itself.
Got it? Well, check out the original thread to get more info about the problem and the solution it’s intended to resolve. Have your own solution? Add it to the pile!
Alex Jackson is an indie developer and the founder of Panc Software, 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: @pancsoftware. Check out his new game Crosstown Smash on iOS, Android, and Amazon devices!