From the Forum — Issue #18

From the Forum — Issue #18

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. PhoneGap sample project for CoronaCards

For those who aren’t familiar with CoronaCards, it’s a powerful offering for app developers who don’t necessarily need the full Corona SDK but still want to access the majority of Corona APIs.

How do you get started with CoronaCards? Android and iOS documentation exists, but what about the other supported platforms? Recently, Corona Labs provided a PhoneGap tutorial for CoronaCards. You’ll need some knowledge about PhoneGap before you begin, but it’s a good starting point.

2. Rolling out pseudo-randomness

Using the math.random() API call is usually the go-to for simulating pseudo-randomness in games and apps. There’s also math.randomseed() which provides pseudo-randomness with equal sequences.

Both are useful and both have their places, but what happens when you want to run through a specific series of numbers and locate a random one amongst the group? What if each interval of choice needs to represent a different non-consecutive number? The above APIs won’t handle that, so a custom permutation might be the best bet. Corona developer ingemar posed this exact question and the Corona community delivered their own suggestions, including some from the Code Exchange.

Jump over to the original thread to get informed on pseudo-randomness.

3. Pathfinding with A*

One challenge with a game concept that incorporates “tap to move” functionality and a grid-based level format is getting the character to move to the place you tapped in a logical fashion. One solution is to use A* pathfinding which calculates the amount of “squares” (as defined by an existing grid) needed to move from square A to square B. It incorporates some relatively complicated algorithms and functional logic, but Corona developer chris20 has put together a handy tutorial on using A* with Lua code.

If you’re curious to learn more, follow the path over to the original thread and grab the free code.

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

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.