Search Unity

  1. Unity 2019.2 is now released.
    Dismiss Notice

Standard screen resolution for PC/Mac game?

Discussion in 'Getting Started' started by Biggerplay, Jan 21, 2015.

  1. Biggerplay

    Biggerplay

    Joined:
    Feb 22, 2013
    Posts:
    147
    What screen resolution should I set for a PC/Mac game? and how do you set that up within Unity?
     
  2. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    You don't set resolutions; that's up to the user. Make sure your game works properly with any resolution and aspect ratio.

    --Eric
     
  3. Biggerplay

    Biggerplay

    Joined:
    Feb 22, 2013
    Posts:
    147
    But what about when you're designing your graphics you have to have a resolution in mind, so I wondered what the standard would be for a PC/Mac game. I should also add it's for a 2D game.
     
  4. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,628
    If you choose a fixed resolution, you will certainly make it impossible for some portion of the market to play the game, or otherwise their screen will open stretched or in some other resolution or as a box in the corner or not at all. e.g. if you went for 1280x800, you've now made a problem for 1280x720 users. You need to do research on how many people have a given resolution and how you might degrade if they don't.
     
    johnzaheer and Biggerplay like this.
  5. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    You wouldn't normally design with any particular resolution in mind. Unity is a 3D engine (even with "2D" graphics) and everything gets scaled. If you're going for an old-school pixel art game, then use point filtering for the textures; everything will still get scaled to the selected resolution. (Example, where selecting full-screen switches to whatever resolution the user's desktop is running at.) 1920x1080 is a fairly common resolution, but your game should work on anything, including 4K, ultra-wide 2:1, and the old 4:3. If different aspect ratios would significantly change the gameplay, then you can use this.

    --Eric
     
    Biggerplay likes this.
  6. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,628
    Only 12% of windows users have 1920x1080 resolution. http://stats.unity3d.com/web/display-win.html

    Shooting for 768 as the height (e.g. mapping your coordinate system to that) might not be a bad idea, for development.

    Pixel filtering is kind of nasty as an upscaling/downscaling method, though.. it will completely chop out certain pixels or double some and not others, and you especially can't do realtime zoom or rotate without shimmering and flickering artefacts. Bilinear works smoother if you don't mind the lack of crispiness.

    You can shoot for a specific resolution with a specific set of graphics designed to look perfect at that resolution, but you're going to then need another set (or more) for other common resolutions. Which turns into a lot of work.
     
  7. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    theANMATOR2b likes this.
  8. Biggerplay

    Biggerplay

    Joined:
    Feb 22, 2013
    Posts:
    147
    This will be a standalone game for PC and Mac. I found this which has useful info on pixel art games. I don't mind artifacts on sprites when they are rotating/zooming but the background is just going to scroll horizontally left/right.

    I'm coming from a iOS background, and with that you pretty much settle on a middle ground resolution and then everything is scaled up or down according to the devices the games on. So I might go for a similar approach.

    But do many Unity games detect the resolution they are running on and then load in a different set of graphics accordingly? or they just rely upon scaling?
     
  9. imaginaryhuman

    imaginaryhuman

    Joined:
    Mar 21, 2010
    Posts:
    5,628
    Maybe so, Eric5h5m but you just recommended a resolution that only 25% of users can access. Fine to target that if it can degrade also, but if its the only res to target, surely a lower-res that can upscale will be more widely supported. e.g. 1280x720 may be supported by that same user base, being combined a much bigger audience.
     
  10. Eric5h5

    Eric5h5

    Volunteer Moderator Moderator

    Joined:
    Jul 19, 2006
    Posts:
    32,145
    You might want to re-read my posts. I'm kind of doing the opposite of saying that a game should only run at 1920x1080.

    --Eric
     
  11. Ryiah

    Ryiah

    Joined:
    Oct 11, 2012
    Posts:
    14,531
    I haven't had to deal with large differences in resolution, but I would imagine keeping sets of graphics for Retina and non-Retina is the primary way to go with everything else being scaled for. At the very least for those resources that degrade poorly when scaled.

    Other platforms may eventually have a similar situation when 4K/5K monitors become easily affordable.
     
  12. Xoduz

    Xoduz

    Joined:
    Apr 6, 2013
    Posts:
    135
    One source for statistics on gamer hardware and software, including screen resolutions, which is very interesting for developers of stand-alone PC games, is this one:
    http://store.steampowered.com/hwsurvey

    For instance, the stats from December 2014 show that 32.94% of (edit: a subset of) Steam users use a screen resolution of 1920 x 1080, while 26.88% use 1366 x 768, and no other screen resolution (for single monitor desktop setups) even makes it into the double digits.

    Edit: I have to correct myself. These stats are not of ALL Steam users, but of random Steam users who have been selected and prompted to (voluntarily) submit hardware & software data to the survey.
     
    maelfyn and Ryiah like this.
  13. Biggerplay

    Biggerplay

    Joined:
    Feb 22, 2013
    Posts:
    147
    I prefer to go with just resolution and put up with whatever scaling issues appear, so it would be better to set the source graphics to 1920x1080 and then on smaller rex monitors scaling down would be better? rather than doing it the other way around?
     
  14. superpig

    superpig

    Quis aedificabit ipsos aedificatores? Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,194
    Yeah, I'd agree with that - it's almost always better to scale graphics down than scale them up. At extreme scale values you may need to switch to artwork that has been authored for a smaller size, but generally I think things look better for longer under minification than magnification.
     
  15. theANMATOR2b

    theANMATOR2b

    Joined:
    Jul 12, 2014
    Posts:
    7,779
    You will mind the artifacts when multiple reviewers or players comment negatively about that being a big issue for them.

    Agree with @superpig and @Eric5h5 It's bests practice to develop graphic assets for the largest aspect ratio you are targeting and then - if needed - beyond what Unity provides - scale down accordingly.

    Though I've heard some talk about developing at a smaller resolution when developing 2D pixel art games. I can't remember which game it was. Maybe Bro-Force?
     
  16. Biggerplay

    Biggerplay

    Joined:
    Feb 22, 2013
    Posts:
    147
    Broforce looks great. I'm also curious how they did those graphics, whether they did them at a small resolution and scaled them up and then imported them at the larger scale or if they let Unity do the scaling up.
     
  17. SiegfriedCroes

    SiegfriedCroes

    Joined:
    Oct 19, 2013
    Posts:
    565
    If you want to make a 2D pixel art game that is 100% pixel perfect then you really have to go for a fixed resolution. I'm doing that for my game and all is fine :)
     
    theANMATOR2b likes this.
  18. Biggerplay

    Biggerplay

    Joined:
    Feb 22, 2013
    Posts:
    147
    What do you mean by fixed resolution? I thought that wasn't really possible with Unity? it just does it's own thing and scales up or down according to what it's being shown on?
     
  19. SiegfriedCroes

    SiegfriedCroes

    Joined:
    Oct 19, 2013
    Posts:
    565
    Well I'm making a game for Android and I can just say Screen.SetResolution(width, height) with whatever values I want (doesn't need to be a common resolution) and Android will stretch that resolution to fit the screen (I do some additional calculations to keep the aspect ratio correct). This is what my game looks like btw:

     
    BrandyStarbrite likes this.
  20. Biggerplay

    Biggerplay

    Joined:
    Feb 22, 2013
    Posts:
    147
    Ah I see what you mean. Nice looking game :)

    What method are you using to place the tiles? a tile editor?
     
    BrandyStarbrite likes this.
  21. superpig

    superpig

    Quis aedificabit ipsos aedificatores? Unity Technologies

    Joined:
    Jan 16, 2011
    Posts:
    4,194
    Well, you need to avoid uncontrollable scaling. I think it'd be OK to scale at integer multiples - for example, scaling from 640x480 to 1280x960 will exactly double all the pixels and keep the crisp blocky look you want. The other approach is to adapt the screen layout to different resolutions by actually changing the relative size-on-screen and spacing between things; this can often work well for HUD elements, for example, to 'anchor' them to the edges of the screen. There are limits to how far that can go before elements start being too small to read on screen and so on, but at that point you switch to a different set of artwork.
     
  22. SiegfriedCroes

    SiegfriedCroes

    Joined:
    Oct 19, 2013
    Posts:
    565
    Yeah, that's true :) On PC I do integer scaling. The native resolution of my game is 320x180 (can be scaled to 640x360, 960x540, 1280x720, 1600x900 and 1920x1080) When it's a different resolution I just set the camera size to the closest integer scaling and adjust the camera rect. I could design some kind of graphical border to show instead of the black. I'm just doing this to keep the retro feel of old games, for other (more modern) 2D games, all this isn't necessary of course ;)
     
    theANMATOR2b likes this.
  23. rebelholic

    rebelholic

    Joined:
    Jan 25, 2014
    Posts:
    6
    Hello, I am still newbie for pixel art resolution. If I have a plan make 2d game platformer with pixel art. How I can setup a map size for level 1 so can be scaled to 4:3, 16:9, and 16:10?
     
    rahulnaik9010 likes this.