I’ve created this thread to allow members to discuss the various pro’s and con’s associated with Universal app development. That is writing apps in Codea that will run (unmodified) on all the main devices from 320x240 iPhone 3GS / iPod touch, retina screen devices, through to iPhone 5/6/6+ with their differing resolutions.
What I’ve done so far with my own projects is work off a virtual coordinate system (ie in the range 0-1) and then multiply the numbers by WIDTH & HEIGHT as necessary. This works for me and I can “fake” different devices by simply setting WIDTH & HEIGHT to the required values. However this means I can end up with a lot of fractional coordinates which aren’t compatible with the new integer restrictions in Lua 5.3 and I have to call math.floor() a lot - this suggests to me that there must be a better (read simpler) way.
Another idea I’m considering is to pick a resolution and simply stick with it and then use the scale() command with an appropriate fixed value to sort things out, but do I opt for the lowest res (320x240) and scale up or the highest res (768x1024) and scale down. What about distortion when catering to devices with different aspect ratios - again an option might be to pick the most compatible res and be wary of “overscan” or “safe zones” - ie not putting important UI elements too close to the screen edges.
What about using different layouts for each device (or class of device) so that a different “view” is presented on phones as opposed to tablets.
Lastly what about orientation changes - personally I tend to pick an orientation and stick to it, but in a lot of cases it makes sense to have different layouts per orientation - like adding a UI split view on the iPad landscape vs having it slide in from the left on portrait, I’ve also seen many apps that present a totally different view depending on orientation - especially on phones.
If you look up any post on HTML5 gaming, layout / resolution / orientation is a big issue given the range of devices and whilst we don’t have that problem there is now at least 5 different resolutions in the Apple eco-system and I can’t see the situation getting any better.
Ladies & Gent’s the floor is open for your comments…