Jump to content
Sign in to follow this  
  • entries
    125
  • comments
    7
  • views
    3995

From the Forum – Issue #184

Sign in to follow this  
CoronaRob

841 views

Welcome to this week’s From the Forum. In this post, we highlight a few Corona Community Forums posts that cover important topics.

Need really big numbers?

Lua supports numbers up to 2^53 in value. That’s 9,007,199,254,740,990 or 9 Quadrillion. While this may be plenty for most apps, it creates a problem because after a number gets to be a certain value, it either displays in scientific notation (with a visible loss of precision) or when trying to use string.format(). But what if you need to display bigger numbers? Several Corona developers joined this thread to come up with ways to manage massive numbers.

Old-school dialog displays

If you’re played any old school role-playing games where your hero interacts with non-player characters (NPCs) to get quests or information you’re used to having text displayed and scrolled words on a small screen where dialog space is a premium. Today’s devices give us quite a few more pixels to work with, but how do you go about doing that scrolling dialog in Corona? This thread offers up a few different approaches to providing these cool old-school dialogs.

Finally…

Corona offers a really cool event that can be attached to objects, including Corona display objects that triggers when an object is being removed. An example of where this is useful, is you might create an enemy that moves on a platform using an enterFrame listener. When you go to remove the enemy, you have to remember to remove the enterFrame listener. Instead you can set up a finalize event where you can remove the enterFrame listener when the object is removed using display.remove() or object:removeSelf(). There is some under-the-hood mystery about when this event actually fires. This thread goes into detail about how to figure out exactly when the finalize event triggers.


Do you have a particular forum thread that was helpful for you? Let us know about it! Email support@coronalabs.com, put FTF: and the forum title in the subject, and include the URL in the email. We will consider adding it to an upcoming edition of From the Forum.


View the full article

Sign in to follow this  


0 Comments


Recommended Comments

There are no comments to display.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!