Hello Guest

Author Topic: How to build for multiple display sizes?  (Read 4903 times)

xikky

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
How to build for multiple display sizes?
« on: July 26, 2013, 08:54:24 am »
I'm working in a mature project and I'm getting concerned about different screen resolutions and wish to clear this out. I'm working on a scene containing a tk2dCam having a native size of 1280x720.

First off.. what would be the best native res to start off a project?

What would be the best resolution of each texture that I import? Should it be 1:1 with native size? (meaning that if on screen I want a box of 100x100, should I import a 100x100 texture? I'm thinking of importing 200x200 instead and scale it to 0.5, in case if the resolution is larger, the sprite does not get stretched.

And how can I cater for all/most types of resolutions. What would happen to my sprites if the game is played from a 2560x1440 display (X2 native res - just for example) or simply from an HD display, or even at a lower res such as 800X480.

If I create a background of 1280X720 how will it be displayed on larger and smaller resolutions?

Thank you for reading, I'm pretty confused when it comes to build a game to multiple screen sizes and have no more than 1 device to test this on my own.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to build for multiple display sizes?
« Reply #1 on: July 26, 2013, 01:04:27 pm »
Native size of 1280x720 will be fine, if that is what you're targetting? What resolution do you want to create your game at? What res are you creating your art at? If you were to mockup a screen of your game in photoshop, what resolution would you do it at? That would be a good native res.

The default override should scale your view to fill the screen at 2560x1440. Your background will look exactly the same, but it won't be pixel perfect anymore, but scaled up 2x.

What you need to do, depends very much on what you want to achieve here.

xikky

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: How to build for multiple display sizes?
« Reply #2 on: July 26, 2013, 01:15:14 pm »
Initially (and currenty) my target was 1280X720. I'm creating the game at this resolution and so a texture of 1280X720 will cover the whole screen exactly.

My concern is what if I need to change my target resolution for larger (HD) displays such as 1920X1080? Or is it that this isn't a problem since 2DToolkit will letterbox my display and so a pixel perfect resolution of 1280X720 is displayed on HD devices?

And if the game is rendered on a smaller resolution then my native res (1280X720) what will happen to my sprites and objects on such displays?

I'm sorry for all the questions but I've got loads to clear my mind about multi screen display and after reading the manual I still don't totally understand. I'm a noob here.

unikronsoftware

  • Administrator
  • Hero Member
  • *****
  • Posts: 9709
    • View Profile
Re: How to build for multiple display sizes?
« Reply #3 on: July 26, 2013, 01:35:59 pm »
The overrides will let you letterbox. It looks like you just want to create one override set to "Fit Visible". That should cover all your bases, and letterbox if the aspect ratio doesn't match. You should add black / colored bars for the letterbox around your original 1280x720 scene though.

http://unikronsoftware.com/2dtoolkit/doc/2.10/reference/tk2dcamera.html
for more details, but in your case, fit visible will be enough.

xikky

  • 2D Toolkit
  • Newbie
  • *
  • Posts: 20
    • View Profile
Re: How to build for multiple display sizes?
« Reply #4 on: July 27, 2013, 07:48:45 am »
Thanks I understand much more now