19 June 2015
From the Forum — Issue #77
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. Get those sprites to fall in line!
Optimization is a tricky boondoggle. Do you maintain a tight grip on memory spending during development? Or go all out for the main thrust of the app’s pre-production lifecycle, and spend time after the fact, making your brilliant ideas work smoothly when that awesome particle system you created?
It’s a question that has plagued software engineers since computers were made with wooden cases. The debate continues in our own Corona forums, with one developer recently opting to ask advice on the best way to implement a logical strategy for spritesheets. Loading, deleting and utilizing the main concerns when you’re dealing with spritesheets, and you don’t want to have to put new ones into memory when that resource is at a premium.
RoamingGamer joins the fray with some pretty solid advice, so head on down to the original thread to see how his comments might help you in your next venture to sprite-land!
2. When is nil, not nil at all?
I remember trying to debug a object removal problem I was having in a business app, wherein the user was flicking and removing several tiles at their leisure. If the user interacted to quickly, however, I’d get a nasty error that an object that was supposed to be removed, was still showing up and causing issues at Runtime.
If I had any hair, I would have pulled it out while tracking down the problem, until I realized (after lengthy research) that some values that are created upon the creation of an object don’t actually get removed on the exact frame that the object is removed. I know, I know, that might be obvious most, but I came upon a thread from intrepid developer Starcrunch, in which he asks the same questions, wondering what would be the safest way to move forward with intelligent checks against objects and their practical viability.
Head on down to the original thread to see this discussion in action. If you have any suggestions or your own, feel free to share with the class!
3. Scaling objects when inserted into groups
This is a quick hit that, I think, will benefit a lot of Corona developers. Working with multiple and varied display groups and inserting objects into them can get tricky. When you’re increasing the size and scale of the objects over time, ensuring that you can get the objects back to their original dimensions can be important, but difficult to figure.
Fortunately, two experienced Corona devs have your back. The below thread has two different methods to accomplish a re-scale on a given object regardless of how many groups into which it has been inserted. Head on down to the original thread to check it out, and if you have some ideas of your own, let us know about them!
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 Crosstown Smash on iOS, Android, and Amazon devices.