From the Forum — Issue #38

From the Forum — Issue #38

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. Using the camera by force

Corona makes it incredibly simple to use every facet and gadget on our i-Devices to their full potential. The camera is not excluded from this rule, as the Corona SDK lets you use both the front and rear cameras through iOS. With the forth-coming iPhones on the way, this feature is even more valuable than before

Capturing the camera video on a constant basis can be a bit more confusing. Just setting the specific camera video and capture type isn’t enough, as this just captures images incrementally and doesn’t actually capture consistent images. The below thread discusses the best method to obtain a consistent feed from your camera.

Hit up the below thread and check out this integral tip. Have your own suggestion? Feel free to add it to the thread!

http://forums.coronalabs.com/topic/51216-graphics-20-camera-texture-fill-not-working/

2. Saving with Metatables

We’re going to deep into Lua knowledge here, and talk about something that is only spoken in the darkest rooms in the shadiest of spots: Metatables. Really, metatables should be understood by all Lua developers, as it’s the backbone to making efficient code that is scalable over every application.

I know that I have had some serious trouble understanding the best way to use JSON saving logic with metatable states, so that you can achieve some persistent savestate information that can be accessed across game or app sessions. Well, starwalt developer Dave Bollinger has answered my frustrations with a post based on this very topic. With these tools at your disposal, you can re-create your own intelligent metatable saving in your apps and optimize your code tenfold.

As Dave says, it might be rudimentary for experienced developers, but it’s still an important skill to have and a great resource for many developers. Have you own theories or techniques? Please share them with the community!

http://forums.coronalabs.com/topic/51267-meta-tricks-with-user-data/

3. Jumper from A to B

All CoronaLabs game developers should be familiar with Roland Yonada. He is the lua genius who came up with shared the Jumper library, making pathfinding a much easier endeavor without leaving us to re-invent the wheel. It’s helped out a multitude of developers and made sure we weren’t pulling out our hair in frustration!

Recently, a Corona developer asked the community for assistance with implementing the Jumper library with a step-by-step character movement method for a game. It’s the next logical step for Jumper, and while we have talked in the past in “From the Forum” about tutorials for Jumper implementation with a GUI, there hasn’t been a walkthrough that discusses how to move a character through each step of the path that Jumper has found. Until now! Yours truly has forked Roland’s library and created a quick tutorial describing the methods needed to step a character through each step of a Jumper path.

Check out the original thread for the straight dope on these methods, and if anyone has any questions or have their own methods, please feel free to share!

http://forums.coronalabs.com/topic/50146-animations-and-jumper/


About Alex

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!

Rob Miracle
[email protected]

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.