Jump to content

[TOPIC: topicViewTemplate]
[GLOBAL: userSmallPhoto]

From The Blog: From the Forum – Issue #184
Started by CoronaBot Jun 29 2018 05:10 PM

No replies to this topic
This topic has been archived. This means that you cannot reply to this topic.
[TOPIC: post.html]


[GLOBAL: userInfoPane.html]
  • Contributor

  • 417 posts
  • Corona Staff

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.


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