Posted on by

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.

http://forums.coronalabs.com/topic/45263-phonegap-sample-project/

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.

http://forums.coronalabs.com/topic/44801-same-random-numbers-for-android-ios/

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.

http://forums.coronalabs.com/topic/47212-pathfinding-in-corona-with-jumper-and-a-star/#entry243913


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!


Posted by . Thanks for reading...

Leave a Reply

  • (Will Not Be Published)