Page 1 of 1
Best Stack Size for various devices...
Posted: Sat Jun 25, 2016 11:58 am
by tj333
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.
Re: Best Stack Size for various devices...
Posted: Sat Jun 25, 2016 2:49 pm
by dunbarx
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
Re: Best Stack Size for various devices...
Posted: Sat Jun 25, 2016 4:30 pm
by FourthWorld
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.
Re: Best Stack Size for various devices...
Posted: Sat Jun 25, 2016 6:11 pm
by tj333
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.
Re: Best Stack Size for various devices...
Posted: Sat Jun 25, 2016 7:48 pm
by FourthWorld
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.
Re: Best Stack Size for various devices...
Posted: Sun Jun 26, 2016 11:28 am
by tj333
Thanks for the info everyone!