From the Forum — Issue #72

From the Forum — Issue #72

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. Database maintenance means always being aware

I’ve seen a few questions come up in the forum about how to handle SQLlite databases on mobile devices. Writing to them is problematic because of the nature of the file structure and how the system.ResourcesDirectory location. What to do in these cases has puzzled developers and caused a bit of confusion.

RoamingGamer came to the rescue on the below thread, specifying the fact that the system.ResourcesDirectory directory is read-only, and as such, a small work-around needs to be implemented to allow the database to run correctly. Head to the original thread to read about the workaround and how to get it working in your own projects.

https://forums.coronalabs.com/topic/56595-preloaded-sqlite3-db-read-only-on-iphone5/

2. The gears in my mind are always turning

The following thread doesn’t necessarily lend itself to any specific problem-and-solution, but it is an interesting experiment in handling multi-element physics bodies and how best to implement them in your games.

The below thread discusses the problems inherent when creating multi-element gears, and delves into a practical discussion of involute gears and the best method for creating gear-shaped physics objects inside with Corona SDK. It’s worth a read for new developers and veterans alike, as it points out some nice logic that can be used for other projects as well.

https://forums.coronalabs.com/topic/56775-trying-to-build-a-rotating-gear-multi-element-physic-body-no-collisions

3. Percentage from point A to point B

Reading over the different tips that folks post in the forum, it can often be difficult to identify their use-cases, and if they are even valid. Posting in the forum doesn’t necessarily mean that the thread has merit. Fortunately, sometimes I run into a post that demonstrates its usefulness straight away.

Corona developer FearTec has graciously provided some Lua-formatted formulas for generating distance from various types of known data. Using percentages to get distances, and converting distances to percentages can be used in so many different applications. Head to the original thread to grab these snippets, and add your own if you have any!

https://forums.coronalabs.com/topic/54176-convert-distance-to-percentage


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 Crosstown Smash on iOS, Android, and Amazon devices!

Rob Miracle
rob@coronalabs.com

Rob Miracle creates mobile apps for his own enjoyment and the amusement of others. He serves the Corona Community in the forums, on the blog, and at local events.

No Comments

Sorry, the comment form is closed at this time.