From the Forum — Issue #124

From the Forum — Issue #124

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!


A little bit more from Google Maps

This first tip is short and sweet and it revolves around one of the great “gotchas” that is the basis of Corona SDK: the OpenGL layer. As we all know, because of the architecture which underlies Corona SDK, any native.* API call that creates a native object places that element above graphical objects created within your Corona app.

If you have your sights set on a super-engaging geo-tagging game, this creates quite the boondoggle. You can’t capture maps with display.save() et. al, nor can you mark up the maps that you create. However, standout Corona developer AidenWolf reminds us that we can still leverage the Google Static Maps API. Check out the original thread below and get clued in on how you can modify your map images with very little hassle!

https://forums.coronalabs.com/topic/62580-how-to-save-photo-from-nativenewmapview/

Remote server querying workflows

If you aren’t coming from a system administrator background, configuring your Corona project to interface nicely with your remote server can be a bit of a struggle. Wrapping your head around all the moving parts isn’t the most exciting process.

Fortunately, exemplary Corona support engineer Rob Miracle responded to a forum thread with some questions about this topic, and helped out everyone by giving a quick-and-dirty dissertation on the finer aspects of SQL integration. Click through to the original thread to grab a bit more info on this very necessary skill.

https://forums.coronalabs.com/topic/63163-its-possible-accessing-remote-sql-server-database/

Some tips for desktop window sizes

The nuts and bolts of Windows and OS X desktop deployment are still being felt out by the Corona community at large. While we do have access to the vast majority of APIs that are standard for mobile development at this point, there are still a few here and there that don’t readily apply.

One of the missing pieces is the read order of our projects. Does the config.lua file get read first, or does the desktop environment get queued in order to identify the various values for the display.* APIs? As Corona engineer Joshua Quick states:

“It’s a chicken & egg issue. We need to read your ‘config.lua' file to determine what the pixel width and height of the window should be, which of course means the display.* Lua APIs can’t be ready for you to use since the pixel width and height you want to read haven’t been determined yet.”

I’ve included two different forum threads that tackle this topic in depth, so that you can be well-armed when you run up against this desktop idiosyncrasy. Truck through to the links below to get inundated with desktop display value discussions!

https://forums.coronalabs.com/topic/63123-display-in-configlua
https://forums.coronalabs.com/topic/63200-how-to-get-current-screen-resolution/

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.

alex
No Comments

Sorry, the comment form is closed at this time.