Building for retina (again..!)

Getting into LiveCode for iOS? Ask your questions here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Building for retina (again..!)

Post by doobox » Thu Jun 30, 2011 4:59 pm

Sorry guys if this is old.

But i am finding what appears to be conflicting info around regarding what screen size to design at, when aiming to support, both 3g and iphone 4.

I believe the latest release of live code took care of some of the issues i see in older posts, so this may be my source of confusion.

If i build at 320x480 and use hi res images (what res recomended 2x ..?) ie 144dpi.
Will this be a sure fire way of getting good results on both displays..?

Another source of my confusion is.. with a basic test building a 640x960 stack with a graphic rectangle all but covering the content area.
When viewed in the iPhone retina simulator with out doing anything else to the stack, i only see a quarter of the graphic.
Is this due to the way live code is handling the retina display now..?
Kind Regards
Gary

https://www.doobox.co.uk

doobox
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 284
Joined: Tue May 24, 2011 11:47 pm

Re: Building for retina (again..!)

Post by doobox » Fri Jul 01, 2011 11:54 am

Stop me if i am taking rubbish.
But the best i can work out is as follows:

If i design on a stack sized at 320x460 (with status bar)
And i make no account for screen resizing.
This will look perfect on the 3g and slightly blur'd on the iphone 4.
As the iphone 4 will stretch each pixel by 2x.

We can not add @2x images to the project for the ios engine to pick up, other than splash and icon...???

Now if the magnifier in iphone 4 is used this doubles that portion of screen area, so you see the effect of the stretched pixels more clearly..?

If i design a stack at 640x920.
I can not use that in either 3g or iPhone 4 without scripting some resizing...???
If the above is correct...does the dpi of the image then matter..?
Kind Regards
Gary

https://www.doobox.co.uk

cenglish
Posts: 34
Joined: Wed May 11, 2011 6:44 pm

Re: Building for retina (again..!)

Post by cenglish » Fri Oct 28, 2011 10:25 pm

Bump. Please let me know if you have figured anything more about this. I am running into the same issue. I'm wanting one app that runs on either the 3GS or iPhone 4/4S but can't find anything on how to build or account for this without going through some long complicated scripting. I am working on LC 5.0 and the latest xcode and everytime I try to run my retina display app, it only shows a quarter of the app in the iphone simulator. I'm also using MobGuI as well. Thanks

Kaubs
Posts: 124
Joined: Wed Jun 29, 2011 3:55 am

Re: Building for retina (again..!)

Post by Kaubs » Fri Oct 28, 2011 11:01 pm

What resolution did you build the stack at?

If you built it for retina then this on the first card of your stack

Code: Select all

on PreOpenStack
 iphoneUseDeviceResolution "true"
end PreOpenStack

This is what I have been doing in my projects to support iPhone 3 and 4

-Create a mainstack that identifies what the device is
-Based off of device send user to a substack built at the resolution the device supports


The easiest way to do this IMO is to build a substack ready for 3 and then replicate it, swap out the images for higher res images and change any code that might ref pixel areas to the correct areas. Don't get me wrong, its a good bit of work but the replication process is a lot faster than initial build or creating two separate projects. Ive used this method 3 times now and it has worked just fine every time.

Mag
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 802
Joined: Fri Nov 16, 2012 10:51 pm

Re: Building for retina (again..!)

Post by Mag » Thu Nov 22, 2012 6:28 pm

I also was in the situation described in the post below and your suggestion worked well. Thank you Kaubs for this interesting and very useful tip!

Post Reply