Hi,
I was wondering what would be a good way for setting up you’re code in such a way that it looks good on different device sizes with different aspect ratio’s in particular so it fits tablets as well as smartphones.
I was reading this jgo article:
http://www.java-gaming.org/index.php?topic=25685.0
which mainly focusses on keeping the aspect ratio, but i was wondering if that is really the way to go.
Some questions that i was pondering on:
-
if i choose to maintain aspect ration and center the game on my device I could get black bars (or i have to fill up the extra space with something). This is probably not what you want. I could maybe create textures/maps wider than the virtual width and height, but that doesnt always looks good (game dependant).
-
If I DO decide to maintain aspect ration, I was wondering how to adjust my virutal on-screen controller. F.e. in my PacManbow game i created button on left & right side of the screen which are drawn relative to the screensize (and also the touchinput is read out that way). If for example I maintain aspect ratio and when centered the virtual origin (x=0,y=0) is drawn on screen at x=0,y=10 f.e. to keep aspect ratio I’ll get issues with my virtual controller. How to address this?
-
What size do i create my images/textures? And if I create multiple version for different screensizes, how many of them do i create. I want my game to look good on 4,5" smartphones, but also on 10"+ tablets.