SyntaxBomb - Indie Coders

General Category => General Game and Application Development => Topic started by: JBR on January 08, 2021, 23:32:40

Title: 1920 by 1080
Post by: JBR 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.
Title: Re: 1920 by 1080
Post by: TomToad 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.
Title: Re: 1920 by 1080
Post by: Matty 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.
Title: Re: 1920 by 1080
Post by: Kryzon 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