51

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 on everything, some can't. Devices with homogenous hardware (PlayStation, Xbox, iPhone...) usually don't offer graphics settings for this reason.


38

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 arbitrary resolution. The easiest way to achieve this is use a 2D Camera, which is essentially a matrix that defines the transition from world space (your ...


29

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 with visual impairments) who prefer to run their desktop at a lower resolution to make things look larger, but still prefer games at the native resolution where ...


20

What you have described is entirely adequate and appropriate to provide resolution independence. Anything you draw will indeed always take up the same proportion of your window. However, if you do nothing more than this, you will have aspect ratio problems. For example, given the numbers you wrote, if you draw a circle, it will be squashed — wider than it ...


17

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 as an example, we can see that even though the sprites have different texture dimensions, they match up on a consistent grid because each pixel is drawn the same ...


16

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 game camera might), we get artifacts because of the non-integer ratio of screen pixels per source texel. Check out the inconsistency in the numbers from the ...


13

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 preset values can be defined using the Player Settings. Additionally the dialog can be disabled altogether within the player settings using the ...


8

A quick snapshot of the information on current android devices can be found here: http://developer.android.com/about/dashboards/index.html The site is kept up to date every 14-days based on devices which access the Google Play Store so its a pretty decent source for information.


7

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-scale it to (800x600), you can do this by rendering this into a texture and applying it on a full screen quad, the advantage you will get is your shaders will run ...


7

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 the game on. There are thousands of different devices a user could be using, and no way to reliably tell what setting would be optimal for every one. Some users ...


7

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 iDevices or Android devices) As you saw in Multi-resolution support document. In fact you just need to set your DesignResolution and then just imagine your target device will has this resolution. If ...


6

Yes, in the situation you describe, you want to use SDL_RenderSetLogicalSize(). The function takes in the width and height of the logical viewport, which in your case is the resolution you want to program your game logic in. You would call SDL_RenderSetLogicalSize(renderer, 320, 240);, and after that you don't need to worry about resolution scaling. SDL ...


5

The problem is that the framerate is too low given the simplicity of the rendering job. Simplicity? You're doing deferred rendering. That's not simple. You're obviously fillrate-limited (as part of the point of deferred rendering is to be fillrate-limited). And your GeForce GT 120M only has 32 shaders. Which is good for a mobile chip, but pretty poor for ...


5

You have to cast the GameContainer object, that is passed in the update method into AppGameContainer, then you can access setDisplayMode... I tested it right now, and it works. AppGameContainer gc = (AppGameContainer) container; gc.setDisplayMode(800, 600, false); But I think you need to use the dev branch of slick, as the "official" version from their ...


5

I believe what you're asking is how to get rid of letterboxing, like this: By default, AndEngine assumes you want some fixed aspect ratio. It then uses letterboxing to handle devices with different display aspect ratios then what you're providing. The advantage is you have certainty about your layout. There's more than one approach to get rid of them, ...


5

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 rendering pipeline, but only when they are read from GPU memory. When not all textures fit into the GPU memory, they need to be read from normal RAM or even worse ...


4

Currently I draw into a texture (1280, 720) or adapted to the screen ratio. Then this texture is displayed upscaled.


4

The most simple answer is what you've already found: draw everything internally to a RenderTarget with a fixed resolution and after that use the RenderTarget as a texture and draw it as large as possible. You should be able to fill the entire screen if the aspect ratio is the same. Simply use the Spritebatch.Draw overload that uses a destination rectangle. ...


4

I see that you've already accepted an answer, but I feel I can add to it. I have written a blog post about this here. The gist of it is as follows: "After a bit of research, I’ve come to the conclusion that most Android phones that I want to target have a 480×800-ish resolution. I’ve also noted that the smallest aspect ratio of any Android phone (held in ...


4

As congusbongus wrote, you have listed most of the options. The usual solutions we use in games (sorry I'll be repeating you a lot): You can keep the gap. If you'll do that, you definitely should center the play area so the gap is the same on all sides. Otherwise it looks strange visually. Then you can.. Fill the gap with some solid tiles, or even some ...


4

Letterbox and scale. Percentages will still break your game. Think about different aspect ratios. The window might be 3:4, 16:10, etc. If you depend on pixel locations, these ratios between player and enemy locations will end up differing. Instead, just pick a size of your world completely independent of pixels. Scale your graphics up or down if the ...


4

Asset resolutions and aspect ratios are two different problems. I don't have any experience with Unity, but this is a platform agnostic problem. < Disclaimer > This is my approach - it might not be the best but it works fine for me. < /Disclaimer > Asset size/resolution handling: Have a few sets of predefined resolutions (for example: mobile, ...


4

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: IDXGISwapChain::SetFullscreenState This is used to switch between fullscreen and windowed modes; if you're not switching (i.e you're going from a fullscreen ...


4

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 puzzle game (see profile for link), I drew my graphics in Inkscape and I exported several resolutions (144x144, 72x72, 48x48) for each texture (the font is also ...


4

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 different than what You get in editor/Unity Remote. Additionaly You can always check how will Your game will presents under different resoultions while ...


4

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 C:\Program Files\Unity\Editor\Unity.exe Right click on the .exe and select properties. Navigate to the compatibility tab, and check the box that says: Override high DPI scaling behaviour. Select scaling ...


4

For desktop games you can control the supported aspect ratios directly in Edit -> Project Settings -> Player -> Resolution and Presentation But for mobile, or situations where your aspect ratio might change during play (eg. resizing a window dynamically), or you want to use letterboxing for artistic effect, we'll need an in-game solution. You ...


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