It’s Wednesday and time for another FAQ session. Here are five frequently asked questions (FAQ). Question 1 Why is text spacing/positioning slightly different between the simulator and device? Answer The fonts are not the same between devices and simulator. The native.systemFont is different depending on the OS. On the Mac, it is LucidaGrande 24 pt. On iOS, it’s Helvetica. On Win, it’s something else. Different fonts have different font metrics even at the same point size, so that will mean differences in alignment. Even for the same font, there can inevitably be differences, since the font rendering is done by the OS. While MacOS and iOS share similar code paths, the underlying text drawing is slightly different. The same fonts will have slight differences glyph
Posts Categorized: Training/Support
It’s Wednesday and time for another FAQ session. Here are five frequently asked questions (FAQ). Question 1 How do I bring the Corona window back to the desktop? Answer This is a common issue with Windows programs where the window will disappear if it’s on an external display and the program is restarted without the display. The program is not hung, just trying to display the window on a non-existent display. This can occur with the Corona Windows Simulator (this is not an issue with the Mac Simulator) and here are the steps for getting back the window: Right click on the Corona Simulator tab in the task bar Click on “move” Press an arrow key (left, right, up or down) Move the move until
It’s Wednesday and time for another FAQ session. Here are five frequently asked questions (FAQ). Question 1 Now that you added the Lua File System (LFS), how can I use it to get a list of files in the /Documents directory? Answer The Lua File System was added starting with Corona build 2012.805. You can read the tutorial here. The LFS now makes it possible to create, delete, and access subdirectories. The key to all of this is creating a string containing the path to the directory. In iOS and Android, there are three main directories: Resource, Temporary, and Documents and they are accessed using Corona constants. These userdata constants need to be converted to a string so they can be used with the LFS.
It’s Wednesday and time for another FAQ session. Here are five frequently asked questions (FAQ). Question 1 When I create functions, I sometimes get error messages saying the function name was nil. I play with the code until the error goes away. What are the rules for getting it right?
It’s Wednesday and time for another five frequently asked questions (FAQ). Question 1 Why do images take longer to load on the new iPad (retina)? Answer This issue came up when a user was using large JPEG images on the new iPad Retina and noticed the time to load the images were a lot higher than on the iPad2. One of the reasons is the new iPad accepts larger image sizes, but we also found out a few things that might help if you have images that take a long time to load. First off, use non-progressive JPEGs. Progressive JPEG take longer to load. How you compress JPEGs makes a difference in load times. Compressing to 70% or 80% can cut down the time to
It’s Wednesday and time for another five frequently asked questions (FAQ). Question 1 Should I use PNG or JPG image files in Corona? Answer The answer depends on the quality of the images you need and the size of your app package. Corona supports 32 bit PNG and 32 bit JPGs. PNG supports transparencies with loss-less compression where JPGs are compressed (lossy) but supports a wider range of colors. PNG files are generally a larger file size than JPGs for the same resolution. This can affect the size of your app package. As for the amount of texture memory consumed, both PNG and JPG take up the same amount of openGL memory because the images are uncompressed when loaded into memory. You should also be
This is a new series of blog posts that will appear every Wednesday and covers five frequently asked questions (FAQ) from support cases, the forum, and documentation comments. Hopefully there will be something here for both the experienced Corona users and those using Corona for the first time. So let’s get started.
As our Corona Community expands, we get more and more people asking us how to get started with building their first app and learning the ropes. Of course, there’s always been great tutorial sites like LearningCorona.com and even a few professors teaching classroom courses about Corona SDK around the world, but those don’t always work out for some folks (bloody geography!). So now, you can get instruction straight from the people who know Corona best — us! Now, we have an “Official Ansca Mobile Corona SDK Training” regimen that you can attend online at your leisure. Specifically, we have two courses — Corona 101 (“The Basics”) and Corona 102 (“Building to Your Device”) — that will help you get your feet wet with instruction on a
When Corona SDK was first released to the public in December 2009, there was only one device screen to target: the iPhone at 320 x 480 resolution. Corona for Symbian had been set aside due to the iPhone’s overwhelming popularity, and Android wasn’t the “next big thing” yet. In 2011, mobile developers need to consider a rapidly growing set of screen sizes, shapes, resolutions and pixel densities. Corona now addresses this in two ways. (1) Content scaling automatically expands (or shrinks) the entire Corona stage so that your content fills different screens. This topic won’t be covered here, but you can read a full discussion of content scaling in this earlier post. (2) In addition, you can employ dynamic image resolution, which will automatically replace
With all the excitement about the Windows Beta, the really awesome 3rd party tools, and the new Indie iOS price point, it’s easy to miss all the cool new features we added to plain ol’ Corona. So let’s walk through them and show some code: In-app purchase In the movie All the President’s Men, Deep Throat tells Woodward to “follow the money”, so let’s start with in-app purchase (IAP). There’s a more extensive walkthrough here, but I’ll just show you a brief code snippet so you get the gist. To access it you use the new store module. On the coding side, there’s basically 3 steps: Initialize the store: This is just loading the store module and registering a transaction listener. Load valid products: You