Posted on by

From the ForumWelcome to the eleventh 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. Real-time multiplayer in the palm of your hand!

Getting a headshot on your buddy is, to some people, the pinnacle of gaming. Unfortunately, delivering a strong realtime multiplayer experience in a mobile game can be difficult and the supporting framework can be just as nebulous and hard to understand.

Enter NoobHub. This handy service acts as a go-between service and handles the “heavy lifting” of a real-time server setup, allowing players to experience your game in real-time. Some of the features include:

  • Connections are routed through a socket server with minimal latency (ideal for action games).
  • Server is written on blazing fast Nodejs.
  • Socket connections that work great through any NAT (local area network).
  • Message delivery is reliable and fast.

In addition, the developer is very communicative and responds to questions very quickly. So, shoot over to the original post and find out how easy it can be to incorporate NoobHub into your project!

http://forums.coronalabs.com/topic/32775-noobhub-free-opensource-multiplayer-and-network-messaging-for-coronasdk/

2. The “began” and the “ended”, but not the end

Even though Box2D is a great way to identify when physics objects collide and interact with each other, many developers encounter problems when working with non-physical UI-related activities. One specific case is how to detect, after the user touches a button/object on a screen, if their finger slides off (outside) the object bounds. Obviously we have the “touch” event listener along with its “began,” “moved,” and “ended” phases — but what about a “still touching the screen but not touching the object” phase?

A lot of people encounter this issue and, just like almost every other dilemma, the Corona community has come up with a great solution that implements some non-physics collision logic and combines it with clever math and Runtime listeners. Using this, you gain a very competent method of identifying when a user touches and object, whether the touch begins inside the object bounds, and whether the touch continues to take place within those bounds, frame by frame.

So, trot over to the forum thread and see how you can implement this into your project. Or, if you have a better method of advanced touch handling, please share it with us!

http://forums.coronalabs.com/topic/43532-determining-if-finger-is-within-an-objects-content-bounds/

3. What’s the strongest protection short of a padlock?

IAP (In-App Purchase) protection is a hot topic these days. We’ve all seen downloads spike while profits remain stagnant, all from a hacked app unlocking your full app without paying the unlock fee.

Fortunately, Corona developer Davemikesell has the same concerns and decided to start a dialogue about it. Borrowing hints from Rob Miracle’s IAP tutorial, he ponders the idea of keeping a JSON string for hit IAP and avoid using a boolean. This is intelligent, as setting a “fullVersion=true” flag is a big flashing red light for pirates seeking to play your game without paying the piper!

If this issue concerns you as well, head over to the original thread and see how you can use this technique in your IAP integration.

http://forums.coronalabs.com/topic/43047-storing-iap-status-in-json-file/


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)