Best Stack Size for various devices...

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
tj333
Posts: 12
Joined: Sat Jun 25, 2016 11:46 am

Best Stack Size for various devices...

Post by tj333 » Sat Jun 25, 2016 11:58 am

I recently watched the video tutorials for the messaging app and the calculator app.

The woman makes the stack size 335px by 667px, and locks the size, stating that this is the size used for an iphone 6.

I am wondering how to determine the best stack size to use if I am targeting a device other than an iphone 6.

Is there a formula to determine the best stack size based on the screen size/resolution of the target device?

Is there a list of suggested stack sizes for various screen sizes/devices published anywhere?

I did try searching the forum, but did not find an answer for this.

Thanks in advance to any who can offer advice on this,

TJ.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Best Stack Size for various devices...

Post by dunbarx » Sat Jun 25, 2016 2:49 pm

Hi.

I don't know about a formula, but there are only a few devices. Why not set the rect of your stack to the device parameters? This can be done in a preOpenStack handler in the stack script. Store all the possible stack sizes in a custom property, and draw from that list as needed.

The bigger issue is scaling all card objects and their locs properly. Or is that automatically managed? I work only in desktop.

Craig Newman

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Best Stack Size for various devices...

Post by FourthWorld » Sat Jun 25, 2016 4:30 pm

There are too many possible screen dimensions in the world of mobile devices to try to plan for each individually. On mobile I do what I do on the desktop, which is more or less what modern web designers do with responsive design: trap the resizeStack message to adjust the rects of anything that needs adjustment. One handler, all devices.

For some types of games or multimedia presentations this can be even easier using the fullScreenMode property (though it's far more limited than scripting your own placement so fullScreenMode should be used very rarely; most apps will benefit from avoiding it entirely).

Either way, more useful than any specific set of dimensions is the ratio. By far the most common screen ratio is 9x16, so if your stack has a 9x16 ratio in development you'll have a better idea of how it'll look on most devices. And with a resizeStack handler you can just adjust the stack rect while you're working to test your layout, without ever needing to deploy to the device until you're further along in your development.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

tj333
Posts: 12
Joined: Sat Jun 25, 2016 11:46 am

Re: Best Stack Size for various devices...

Post by tj333 » Sat Jun 25, 2016 6:11 pm

Thanks for the advice everyone.

I will use a stack size of 450px by 800px that should be 9:16 ratio and give me a good idea how it will look on most devices?

I guess there isn't a standard size used for mobile development in live code, but would this be close to what other developers use?

Thanks,

TJ.

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Best Stack Size for various devices...

Post by FourthWorld » Sat Jun 25, 2016 7:48 pm

FWIW this chart uses reasonably recent data, and shows 640 x 360 to be the single most popular screen size:
http://blog.fluidui.com/the-mobile-reso ... designing/

One nice thing about that is that you should be able to work comfortably with it even on a smaller laptop with a 768p display.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

tj333
Posts: 12
Joined: Sat Jun 25, 2016 11:46 am

Re: Best Stack Size for various devices...

Post by tj333 » Sun Jun 26, 2016 11:28 am

Thanks for the info everyone!

Post Reply