Howdy Folks,
I have used Corona SDK for a handful of years on gaming projects and have always been pleased with the results. In my day job, I work for a digital agency that builds business apps for very large Fortune 500 brands. Recently someone approached me about using Corona to build one of these apps. Up until now, we’ve always built two native apps, one for Android and one for iOS.
I like the idea of Corona because so much of what my company does is work with artists to produce very custom UI/UX anyhow so the limited number of widgets probably doesn’t matter. However, we didn’t get very far with our prototype before developers and artists were all asking me the same thing: how can we get pixel perfect positioning and size?
I did a bit of research, and came across this article: https://coronalabs.com/blog/2014/10/28/resolution-independence-adaptive-content-scaling-in-corona/. Which is great, and, the example image with the table views and rows is exactly what I’m looking for. That said, I’m not really understanding the nuance. I’ve set my scale to “adaptive”, but an imageRect for example that I set to 100x100 does not appear the same size across the various devices, at least on the emulator. On the Nexus One it looks like a postage stamp but on the iPad Pro it is like half the size in terms of inches.
Text is even more confusing as there seems great variance in the text height and width from one device to the next. The only way I’ve been successfully in getting relatively the same physical height across devices is to size everything as a percentage or ratio of the entire screen. This isn’t terrible in my mind, but its never going to be pixel perfect, and from the view of the artists who are blueprinting the screens, they want to know how units between native iOS (points) and Android (dp/sp) translate.
The fact is right now I have some blueprints in Zeplin that show for example a font as 65-sp and I really don’t have any idea how to achieve the result besides “eye-balling” it and making the height some percent of the screen height. Can someone out there give me some hints? I’d love to be able to use Corona for some of the stuff I’m currently doing native iOS and Android.
Thanks!