From the Forum — Issue #109

From the Forum — Issue #109

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!


Mouse wheel scrolling, in widget form

Now that Corona lets us develop games for Win32 and OSX, we can spread that sweet WASD love around every game and application we have dreamt about bringing to the desktop. There are a lot of amazing options for game development now that we aren’t bound by mobile.

The main thing that I’m excited about is, getting all of my peripherals in on the party. However, for anyone that has tried this, you might have found that getting useful feedback from the mouse scroll wheel can feel like pulling teeth.

Fret no more! One developer has found a suitable workaround when dealing with a scroll wheel on a scrollView. Head on down to the original thread to learn more about it.

https://forums.coronalabs.com/topic/61465-osx-scrollview-working-with-mouse-wheel/

Concurrent programming in Lua

Let’s assume for a second that you are attempting to some seriously high-octane permutations in your Corona-developed application. You are chugging along, thinking everything is hunky dorey, when you decide to do some quick bench-testing on a mobile device. You fire up your app, and… you hit a wall. You realize that lag from concurrently running functions and various callbacks all needing attention makes for a very bumpy user experience.

Enter coroutines. I really can’t believe that I haven’t highlighted the technique before, as it’s very useful and can be implemented rather easily. Now, a caveat: there is a library that is linked in the thread that is pretty high-level, and, full disclosure: I’m not completely clear on what is being achieve! But that doesn’t mean that it’s going to go over your head too. Head down to the original thread and read up on the topic!

https://forums.coronalabs.com/topic/61514-threading-in-corona/

Simple Game Center

A couple weeks ago, I highlighted a thread that had a great little attachment, that showed some pretty nifty Game Center implementation, and combined with the Corona SDK-included Game Center sample code, makes for a really great base for getting these features implemented in your next game.

In order to add to this base, I want to highlight the below thread. In it, Corona developer relations specialist, Rob Miracle goes in-depth on what is included in the sample project and why, and dissects the relevant lines and their uses. Great for beginners and veterans both, I urge everyone to check it out and see if you can use it, or perhaps condense your own implementation!

https://forums.coronalabs.com/topic/61469-apple-game-centre-sample-code/

About Alex

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 Segreta on iOS, Android, Windows Phone 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.

1Comment
  • Thomas Vanden Abeele
    Posted at 00:58h, 08 February

    Hi! Regarding the co-routines, I think it would be best for posts like these to make VERY clear that co-routines are not the same as multi-threading, and even more: in essence, co-routine do not offer specific functionality to speed up things performance-wise. They are no faster per se, but sometimes they are faster because they are “the smart way” to code something. In my personal opinion however, there are usually other ways, without co-routines, that are just as fast.