Resolution independence (sort of) today
Graham Samuel
livfoss at mac.com
Fri Mar 1 12:43:20 EST 2013
Thanks Colin and Chris. Pretty much my worst picture, but it's obviously doable. I have not used tmControl but I'll look into it.
My app is a single-screen educational program with some simple game-like features, but no rapid movement. On the screen there are images (they're simplified photos of real objects) which get moved by the user - by dragging - but they can only snap to certain places on the screen. The way the code works now is that each object has a list of legitimate parking positions in a custom prop (sadly that's actually a simplification). What I need to do is to abstract this method a bit, so that the main logic of the program is in effect resolution independent - the position lists will be chosen according to screen size. Actually on thinking about it, my method does have some advantages for a multi-resolution implementation, although my initial setting up will be fiddly and I'll probably have to write a utility to help me do it. Resizing the images downwards for the lower-res version isn't a problem, as I've done that lots of times before...
As for Colin's suggestion that the Retina version could be an enhancement, that's very attractive - but I got the idea that a new app in the store had to have a retina version (I haven't ever released an iOS app, so the subtleties of what Apple demands are not yet familiar to me). Of course I'll be looking into it some more.
All in all then, no showstoppers, but more work than I'd hoped.
Thanks again for the very swift and helpful replies
Graham
On 1 Mar 2013, at 18:19, Chris Sheffield wrote:
> Graham,
>
> In the case of One Minute Reader, it would kind of depend. Most of the time we used larger "retina" images and then scaled them down via script for the lower resolution iPad. This worked well, it's fast, and quality was pretty decent. There were exceptions to this where sometimes it was required to use two sets of images. You kind of just have to experiment to find what works best.
>
> As for graphic objects those scale very nicely.
>
> Are you using Scott Rossi's tmControl by chance? He has some great ways there to scale objects between retina and non-retina. It would require some setup if you're not already using it, but would be well worth it in my opinion. Using tmControl, you can specify a property on any object (fields take a little extra work) to have it automatically scale and reposition itself. And since you're only using one orientation (landscape) that makes things even easier.
>
> If you need more info, let me know.
>
> Chris
>
>
> --
> Chris Sheffield
> Read Naturally, Inc.
> www.readnaturally.com
>
>
>
> On Mar 1, 2013, at 9:58 AM, Graham Samuel <livfoss at mac.com> wrote:
>
>> Thanks Colin Holgate for your excellent explanation of what resolution independence is and isn't, or rather what it could be when implemented. I have an issue in this area right now, and I suppose I will find the answer in the docs somewhere, but meanwhile could some one give me a quick answer?
>>
>> I have an app that works in Landscape only on an iPad 2. I want to adapt it for the most recent iPads, which of course have twice the number of pixels in both directions (Retina). I'm quite happy to re-work my app to fill this larger space properly - there are quite a few images, which I need to revise to make them properly sharp etc. I am confident that I can make the app look good on the Retina screen.
>>
>> The issue is, what happens when a retina-style app like this runs on an iPad with the lower resolution? Can the reduction be achieved automatically, or do I have to create in effect two versions of the app to get it to work? Obviously what I want is for all the objects on the screen to be automagically reduced in size, while retaining the original location information - so far example an object at the centre of the retina screen would be at (1024,768): if I show this on a pre-retina screen, do I have to change the loc to (512,384) and by implication change all the locs of all the visible objects, or will iOS do it for me?
>>
>> Sorry if this obvious to everyone else.
>>
>> TIA
>>
>> Graham
>> _______________________________________________
>> use-livecode mailing list
>> use-livecode at lists.runrev.com
>> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
>> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
More information about the use-livecode
mailing list