Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. Dismiss Notice

2D Multiple Resolution Support

Discussion in '2D' started by Ezro, Jun 20, 2014.

  1. Ezro

    Ezro

    Joined:
    Jun 7, 2013
    Posts:
    32
    Hi everyone,

    I'm working on a game, and am a bit stuck.

    I am currently still coding functionality, but the majority of my functionality is built using a temporary GUI, with improper dimensions/scaling. Before I continue with adding the front-end aspects, I would like to iron out my approach on multiple resolution handling.

    Background
    The game will be an orthogonal 2D RPG. It is currently being developed for PC, but I would like to be able to port it to mobile devices, and consoles as well. This means that the game would need to have support from very low resolutions, all the way up to HD resolutions.

    Character models should be very detailed, as cosmetic items will be a large part of the game; I would ultimately want the game to look crisp on all resolutions, even if it's a lower resolution.

    Also, I am mainly using 2D Toolkit for development.

    Outstanding Questions
    From what I've read, the textures would need to be designed at a base resolution of 960x640 (2x), with a low resolution of 480x320 (1x). If I were to do that, though, I would also need a set at 1920x1080 (4x), for PC support.

    What other solutions would be possible?

    Also:
    • How well would non-vector art scale at non-native resolutions? (Texture clarity at resolutions which aren't 1x, 2x, 4x)
    • How to prevent stretching/skewing when scaling, to prevent relative distances between objects from changing?
    • How well would vector art work for this?
    • How well would pre-rendered 3D models work for this?

    Regards,
    Ezro
     
  2. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    933
    The best answer is to create your textures at the highest resolution and scale down when you need to. I've gone ahead and started creating all my texture atlases at 4096x4096. Think aspect ratio instead of pixel and then make it as large as you want.

    I use this template for as a start for the size of my assets.

    http://v-play.net/doc/images/v-play-background-template-hd2-2280x1440.png

    So my Hero from 100 Orcs has a master texture of 1024x1024. I know that on a large computer screen he will only be 256x256 but that extra resolution is just for safety. On mobile i am pretty sure he is only 64x64.
     
  3. Ezro

    Ezro

    Joined:
    Jun 7, 2013
    Posts:
    32
    Won't that lead to a significant decrease in quality, when downscaling, though? (Unless it's vectorized)
     
  4. Valette

    Valette

    Joined:
    Jun 9, 2014
    Posts:
    68
    This is something that's been puzzling me. I started playing around with Unity about 3 months ago, not expecting three months later to be at the final stages of writing a basic game. I started out naively drawing my stuff on 4096x4096 textures which I then resampled down to 1024 or 2048, others lower. I'm making this for Android and what surprises me is how many big textures I can throw around. I also notice that I can change the resolution of many of these textures at build time using the 'Override for Android' option. I've been doing that lately not because of problems of performance but simply to make sure my APK isn't too big.

    Not sure that answers you question but I think I'm basically agreeing with Bridin. Make your stuff at higher resolutions than you need. You can easily downscale but you can't easily upscale.
     
  5. Kellyrayj

    Kellyrayj

    Joined:
    Aug 29, 2011
    Posts:
    933
    No not at all. Consider the size of the resolution on your screen. When you display a 4096 texture on an iphone screen for example, you are still only showing the photo at 960 by 640. So it makes sense to decrease your texture to a 1024 by 1024. Or even 2048.

    Your large computer screens are going to be around 1080p anyway so a 4096 texture cut in half is still larger than your screen.