Jump to content
  • Advertisement
Sign in to follow this  
maheshbinny

Best Resolution for 2D games

This topic is 2521 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Advertisement

I am planning to develop a 2D game for PC, I am little bit confused about game resolution.

What is the best resolution for 2D games?


Take a look at my Old Blog (in my sig). Grab my latest version of code, and check out the Utilities.ccp/h files. I allow the user to enter the resolution he wants to use in my game. You might want to consider doing that as well.

Share this post


Link to post
Share on other sites
I would argue that if you support multiple resolutions, unless you have a very good dithering system of high res textures, or textures per sets of resolutions, the game appearance will suffer.

Share this post


Link to post
Share on other sites
I'm pretty noobish at this game developing stuff as well, and had a related question. What exactly happens when a user "switches resolutions" for a game? Does the game switch the screen resolution as well? I'm just kind of confused by the whole thing really.

Share this post


Link to post
Share on other sites
It depends. Some games will specify a specific screen resolution, some will save the users preffered resolution for the particular game, and some will simply use the native (desktop) resolution.

Share this post


Link to post
Share on other sites
I just use a common resolution for my game, like 1024x768.
This is the amount of pixels your screen uses. The game will be best played on this resolution.

If you change the resolution it simply gets streched out, unless you use different images for each resolution.

Share this post


Link to post
Share on other sites
This is fine for a 4:3 ratio screen but if you if you do this on a 16:9 screen, guess what? It gets stretched out.

Thats why I go for the users native resoultion. and position things relative (not absolute). From my understanding, this is what the AAA game dev's do.

Share this post


Link to post
Share on other sites

This is fine for a 4:3 ratio screen but if you if you do this on a 16:9 screen, guess what? It gets stretched out.

Thats why I go for the users native resoultion. and position things relative (not absolute). From my understanding, this is what the AAA game dev's do.

But the thing about 2D games is that changing the screen resolution can significantly change the gameplay or feel of the game because of how they usually use planar coordinates.
Diablo 2 widescreen "hack" is a good example of this, the oringinal game has quite a narrow view to limit your visibility for monsters, but using the widescreen hack you gain a huge view of the surrounding area and get quite a different experience of the game.
In 3D games this effect isn't felt that much because most of the action takes place along the z-axis ("dow/ninto" the monitor)

Share this post


Link to post
Share on other sites
By general rule, you should allow the user to specify the resolution and then scale the graphics accordingly. This is pretty much non-trivial when using a GPU, since you're already working with a virtual resolution for starters (to map game coordinates to Direct3D/OpenGL/whatever coordinates), though beware of undesirable artifacts when scaling textures.

The biggest problem here is the resolution ratio though, since it could be anything, really. For the HUD it's easy to just set the coordinates relative to the borders (or center) of the screen. For 3D games, you can simply change the FOV. For 2D games it becomes an issue though because usually the camera has limits within which it can scroll, and if the ratio is wide or tall enough, it's perfectly possible that the viewport will be too big to fit inside the limits. You need to come with a workaround for this (somehow).

Also, don't assume only a few ratios exist. 4:3, 16:9 and 16:10 are the most common, but there are some other common resolutions that have different ratios (e.g. 1280×1024 is 5:4).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!