Resolutions...

Monkey Archive Forums/Monkey Discussion/Resolutions...

Paul - Taiphoz(Posted 2012) [#1]
I'm about to start a little side project, little prototype thing and I started thinking about resolutions, Windows phone does 800*480 iPhone seems different per version and god knows about Android.

How do you lot deal with a project when you know you want to hit more than one platform, do you code it in a fixed resolution first and then adjust your code for each target , or do you use a virtual resolution setup.

As per virtual resolutions, anyone got an example of this I could mull over.


silentshark(Posted 2012) [#2]
I'm only doing my first Monkey project, so forgive the noob answer..

What I've done is hard coded the resolution for my main target device 800x480 Android. I've combined this with DB's wonderful Autofit code and this seems to allow it to run at all sorts of resolutions. Check out Autofit and the supplied examples - really easy to use, and does what it says on the tin!


Paul - Taiphoz(Posted 2012) [#3]
Yeah I got a solution to this from within Diddy framwork, but I will check out autofit as well. you got a link ?


silentshark(Posted 2012) [#4]
yers - here's the link you want - http://www.monkeycoder.co.nz/Community/posts.php?topic=1500


therevills(Posted 2012) [#5]
BTW Diddy uses the James' Autofit code ;)


Paul - Taiphoz(Posted 2012) [#6]
Oh lol so sticking with diddy then...


Rex Rhino(Posted 2012) [#7]
The 2D graphics are all accelerated openGL, so you can scale everything relative to your screen very easy. The only odd point is the aspect ratio.


therevills(Posted 2012) [#8]
The Autofit code uses aspect ratio too (James did a great job!) :)


muddy_shoes(Posted 2012) [#9]
How do you lot deal with a project when you know you want to hit more than one platform, do you code it in a fixed resolution first and then adjust your code for each target , or do you use a virtual resolution setup.


The answer is, as pretty much always, "it depends". Scaling has limits whether going up (blurry, blocky) or down (lost detail). If you're going for a purist pixel art look then you're even more limited. As discussed in the other thread, game designs can make requirements on how to respond to aspect ratio variation.

If there was one simple answer for all projects then the whole problem would have been solved long ago and you'd never have this sort of thing: http://kotaku.com/291697/bioshocks-widescreen-pissing-people-off

Using a virtual resolution set-up of some kind will make it easier for you to tweak your strategy but the blunt "scale it all to fit" approach is really just the least you can do.


Rex Rhino(Posted 2012) [#10]
I tend to lay things out with a Swiss Grid. Instead of thinking in pixels, think of the screen in terms of grid cells. Break the screen up into something like 16 by 8... I use 16 by 8 instead of 16 by 9, because I prefer to have even numbers that will bisect the screen vertically or horizontally with 0,0 being the center of the screen.

16x8 should fit into just about every screen proportion (only mobile apps have screens taller than wider... but most allow you to turn it on its side). Then, I make sure to have extra stuff that bleeds off the screen to fill the screen in all proportions... but I keep the critical stuff in the 16x8 area.

Here is a good article about the Swiss Grid system: http://guity-novin.blogspot.ca/2011/07/chapter-42-swiss-grade-style-and-dutch.html ... It was developed in the early 20th century for print, but it is extremely useful for software development.