Page 1 of 1

Rube screen sizes

Posted: Fri Aug 29, 2014 6:53 am
by kyle.bong2@gmail.com
Hi all,

Any recommendations on handling multiple screen resolutions? I have a game board created using rube and the size seem smaller/bigger in different devices. Do i create a rube file for each screen ? Any samples, better solutions or recommendations?

Thanks!

Re: Rube screen sizes

Posted: Fri Aug 29, 2014 10:28 am
by iforce2d
Can you just scale the rendered size to fit the screen? It would mean that part of the screen would be cut off (usually the left and right sides) on screens that have smaller aspect ratio. This thread might be helpful: http://www.box2d.org/forum/viewtopic.ph ... 27&p=40591

Yes, you could make a different .rube file for each screen size, but that seems like a lot of work and there are a lot of different screen sizes to cover. If you're talking about gameplay screens, it's also a bad idea to go changing the physics world sizes from one device to another, because the game will play differently.

The only time I would bother using separate .rube files is when:
a) menu screens only (not gameplay screens!!)
b) not many screen variants to make it for (eg. iOS has relatively few)
c) difference in screen variants is enough to make it worthwhile (eg. iPhone5 is 16:9, iPad is 4:3)

As you can guess from my "eg." there, we did this for an iOS game before. But even then, we did not have separate .rube files for eg. iPad and iPad retina, because they are the same aspect ratio. So we only had three .rube files in total for each menu screen.

Re: Rube screen sizes

Posted: Fri Aug 29, 2014 3:35 pm
by kyle.bong2@gmail.com
Thank you that's very helpful!