October 28, 2021, 11:48:21

Author Topic: 1920 by 1080  (Read 545 times)

Offline JBR

  • Full Member
  • ***
  • Posts: 143
1920 by 1080
« on: January 08, 2021, 23:32:40 »
Hi, is it reasonable to expect peoples PCs to run at this size?

What about smaller and what about larger?

What is the best approach?

hny Jim.

Offline TomToad

  • Hero Member
  • *****
  • Posts: 557
Re: 1920 by 1080
« Reply #1 on: January 09, 2021, 01:10:39 »
Best approach would be to detect the desktop screen size and set the resolution to that, but still give the user an opportunity to change it if they want something bigger or smaller.
8 rabbits equals 1 rabbyte.

Offline Matty

  • Hero Member
  • *****
  • Posts: 1369
    • MattiesGames
Re: 1920 by 1080
« Reply #2 on: January 09, 2021, 01:36:12 »
In my recent game which uses SDL2 I let the software pick the current screen resolution and use that but rescale everything internally as if the screen display was 1600x900.

As long as the user is using a screen with a widescreen aspect ratio it looks fine.

It also means I can kind of treat all sprite coordinates as resolution agnostic since everything including mouse input is transformed to be as if it were that resolution.
I eat cheese in the trees when its eight degrees

Offline Kryzon

  • Sr. Member
  • ****
  • Posts: 278
Re: 1920 by 1080
« Reply #3 on: January 10, 2021, 21:51:14 »
What Kodi does is let you set up the "skin" (interface) of your add-on in terms of a 1920x1080 screen, and then scale the coordinates to match the users' screens. So if someone uses your add-on on a 1366x768 that GfK mentioned, as well as any other screen w/ the same ratio as that 16:9 base, will look the same layout-wise. 
And if the ratio is different you can letterbox it or use some other form of padding.

Even though your interface can have a dynamic layout, you'll still have to use an absolute size for things like background images (i.e. paint them at 1080 and upscale/downscale ingame as needed).


SimplePortal 2.3.6 © 2008-2014, SimplePortal