52 votes

Why do games ask for screen resolution instead of automatically fitting the window size?

This lets the user choose the game's quality versus its performance. Some prefer higher-quality graphics settings on a lower resolution, others the opposite. Some computers can handle maximum settings ...
user avatar
  • 588
38 votes
Accepted

Is it a bad idea to "map" the mouse position on the screen so that collision detection works regardless of resolution?

Typically (even for 2d games) there is a separate coordinate system for the game that is independent of the resolution, this is typically referred to as the world space. This allows you to scale to an ...
user avatar
29 votes

Why do games ask for screen resolution instead of automatically fitting the window size?

There is no way to completely reliably detect the correct screen resolution. One approach is to simply leave at the user's desktop resolution. This is annoying, as I know a number of people (some ...
user avatar
  • 390
20 votes
Accepted

Scaling my pixel art platformer from 720p to 1080p

For anyone wondering why this is an issue for pixel art, here's a quick example using a scene from Super Mario World: If we just scale a pixel art game from 720 to 1080 at runtime (the way a typical ...
user avatar
  • 112k
19 votes
Accepted

Understanding pixel art in Unity 2d

Summarizing the points above, what matters for two pieces of pixel art to match is that their pixel density (texels per screen area / world unit) is the same. Using some sprites from Stardew Valley ...
user avatar
  • 112k
13 votes
Accepted

Game prelauncher with configurations (resolution/quality)

The launcher in question is included by default for games built with Unity and is called the resolution dialog. Currently there is very little customization that can be done to this dialog though ...
user avatar
  • 2,917
11 votes

Performance degrading when resolution increases for a 4k screen

One way to limit the resolution of your game is to have your camera render to a RenderTexture. You can create a RenderTexture in script to match the current aspect ratio of your window/screen, or even ...
user avatar
  • 112k
8 votes
Accepted

How to force keep the aspect ratio and specific resolution without stretching the output screen view?

For desktop games you can control the supported aspect ratios directly in Edit -> Project Settings -> Player -> Resolution and Presentation But for ...
user avatar
  • 112k
7 votes
Accepted

How to make OpenGL rendering resolution independent from its window context resolution?

Yes, but keep in mind the default frame buffer will always be the same size of the window. What you can do is to render your scenes internally into an off-screen (400x300) frame buffer, and then up-...
user avatar
  • 12.5k
7 votes

Why do games ask for screen resolution instead of automatically fitting the window size?

There are a VAST number of reasons to allow the user to control the settings for their game. MANY people have 2 (or more) monitors these days. The user should be able to determine which one to play ...
user avatar
  • 171
7 votes
Accepted

Cocos2d-x supporting multi-resolution using density independent pixels

There is no option about dp in cocos2dx and in fact we don't need it. But cocos2D-x 2.x and 3.x have very easy solution for multi-resolution problem ( either ...
user avatar
  • 910
5 votes

Why do games ask for screen resolution instead of automatically fitting the window size?

That's because the cost and effect of texture quality, geometry detail and screen resolution are very hardware-dependent. The texture quality usually does not have much impact on the speed of the ...
user avatar
  • 111k
5 votes

Yet another libGDX resolution independance question

Unfortunately, there is no magic: the only good way is to implement resolution independence yourself. While libgdx may be of some help, it's not going to solve your every problem. For my NoThree ...
user avatar
5 votes

Performance degrading when resolution increases for a 4k screen

The text & button size issue can be addressed by changing the Canvas Scaler component on the canvas to a mode other than Constant Pixel Size: In Scale With Screen Size mode, you set a reference ...
user avatar
5 votes

Performance degrading when resolution increases for a 4k screen

I know that you tagged the question as unity-webgl, but some people might find this question while developing a desktop game and might find this answer useful: For a desktop game, you can use the ...
user avatar
  • 111k
4 votes

DirectX 11 Updating Resolution

This is documented at: DirectX Graphics Infrastructure (DXGI): Best Practices and further discussed at DXGI Overview: Care and Feeding of the Swap Chain. There are 3 basic calls involved, as follows: ...
user avatar
4 votes
Accepted

Unity Remote screen resolution

According this answer from Unity Answers Forum, Unity Remote doesn't really play game on device, rather than it stream video output to device from editor. The final presentation of Your game will be ...
user avatar
  • 221
4 votes

How to change Unity's display settings/resolution?

It appears that the resolution of your computer is higher than what Unity normally handles. To resolve this: Find the Unity.exe, This is normally located at ...
user avatar
4 votes
Accepted

How to adjust objects' coordinates and scale for different device resolutions?

This depends on how you've authored the objects. 3D objects and 2D sprites positioned in your scene's worldspace will not move, scale or change their worldspace transformations no matter what happens ...
user avatar
  • 112k
3 votes
Accepted

Is using camera and viewport in Libgdx always necessary?

With a camera you separate your game measurements from the screen size and ratio. It is not always better. If you make a board game for example, you can just fit it to the width of the screen, the ...
user avatar
  • 189
3 votes
Accepted

How to properly change resolution

You could try using a Camera when drawing your images. Create a new OrthographicCamera like so: ...
user avatar
3 votes
Accepted

How to resize my 2d game to fit the screen?

I'm assuming you're using the standard Java 2D API, not OpenGL. In that case, you render your graphics to a buffer image first. Then, to render that image to the screen, you can either use a Graphics....
user avatar
  • 1,199
3 votes

Yet another libGDX resolution independance question

I'm studying this book, and here what I learned so far: You need to set a OrthographicCamera passing width and height of your screen, If you want pixel-perfect manipulation, pass the screen ...
user avatar
3 votes
Accepted

Problem, why the mouse cursor position is totally wrong, after resizing the window?

When you resize your game resolution you need to update every single rectangle in your game (every button, etc) and multiply it by a proper scale, so that the "...
user avatar
  • 1,287
3 votes
Accepted

Pygame Fullsreen Display Issue

I managed to find a commit on the Pygame BitBucket page here that explains the issue and gives an example on how to fix it. What is happening is that some display environments can be configured to ...
user avatar
3 votes

How do you create images that work for multiple resolutions?

The fourth option is to generate the image when you know the resolution (after startup). This means having enough information in the game to properly render the image to texture on startup (and maybe ...
user avatar
3 votes

Scaling my pixel art platformer from 720p to 1080p

Elaborating specifically on @DMGregory's option of creating alternate assets at a different resolutions: The best solution I know of is probably the least use to you at this this point: develop your ...
user avatar
  • 8,530

Only top scored, non community-wiki answers of a minimum length are eligible