Jump to content

  • Log In with Google      Sign In   
  • Create Account


#ActualDaaark

Posted 08 October 2012 - 09:03 AM

There are many ways to handle this.

You can draw your game into another image or texture, and then render that to the center of the screen. If the screen is bigger, draw a background image first, then the game screen over it. Lots of games do this to handle different aspect ratios. You could also scale the image to the size of the screen, but that will likely cause ugly blurring, or other artifacts.

You could draw your objects without assuming any game resolution. Just anchor them tot he edges of the screen (if it's a gui),

OR

Use normalized screen coordinates (0.0-1.0). This way, ScreenWidth * 0.5 is always the center of your screen. ScreenWidth * 0.0 is always the left edge. ScreenWidth * 1.0 is always the right edge.

Or

You could just draw more.

Depends. Show us what your game looks like, and explain a bit more.

#1Daaark

Posted 08 October 2012 - 08:59 AM

There are many ways to handle this.

You can draw your game into another image or texture, and then render that to the center of the screen. If the screen is bigger, draw a background image first, then the game screen over it. Lots of games do this to handle different aspect ratios. You could also scale the image to the size of the screen, but that will likely cause ugly blurring, or other artifacts.

You could draw your objects without assuming any game resolution. Just anchor them tot he edges of the screen (if it's a gui),

OR

Use normalized screen coordinates (0.0-1.0). This way, ScreenWidth * 0.5 is always the center of your screen. ScreenWidth * 0.0 is always the left edge. ScreenWidth * 1.0 is always the right edge.

Or

You could just draw more.

Depends. Show us what your game looks like, and explain a bit more.

PARTNERS