January 21, 2021, 09:03:59 AM

Author Topic: 1920 by 1080  (Read 201 times)

Offline JBR

  • Full Member
  • ***
  • Posts: 123
1920 by 1080
« on: January 08, 2021, 11:32:40 PM »
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: 522
Re: 1920 by 1080
« Reply #1 on: January 09, 2021, 01:10:39 AM »
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: 1339
    • MattiesGames
Re: 1920 by 1080
« Reply #2 on: January 09, 2021, 01:36:12 AM »
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 GfK

  • Full Member
  • ***
  • Posts: 206
  • Scrotty furtler
Re: 1920 by 1080
« Reply #3 on: January 09, 2021, 12:46:59 PM »
Quote
Best approach would be to detect the desktop screen size and set the resolution to that
That.

1920x1080 is very common among gamers, but 1366x768 is equally common on widely popular, low-end, off-the-peg laptops.  However, they're both 16:9 aspect ratio.
Intel I9-9900K 3.6-5.0GHz | GeForce RTX2070 8GB | 32GB RAM | 500GB NVMe M.2 SSD | 1TB HDD | Windows 10 x64.
MSI Apache Pro | I7-7700HQ | GeForce GTX1060 3GB | 8GB RAM | 128GB SSD | 1TB HDD | Windows 10 x64.

Offline Kryzon

  • Full Member
  • ***
  • Posts: 246
Re: 1920 by 1080
« Reply #4 on: January 10, 2021, 09:51:14 PM »
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