I’m trying to decide on sizes/dpi of png sprites we(developers) will need from designer for a 2d mobile word-like game.
I understand how to setup canvas, that scales accordingly to phone screen size and dpi, I’m trying to decide on preferable sprites sizes for buttons, background etc.
Questions: 1. What “Reference Resolution” property for canvas can you suggest, knowing that this game is for mobile phones and tablets(Android, iOS, Windows) and only uses portrait mode.
I might find the resolutions for all common devices we’ll try to support and will take the highest resolution(but which is still common) as a “Reference Resolution”, is it correct approach?
Is 800x1200 a good one?
2. It’s suggested to make sprite-sheets sizes a power of two(sprite-sheet 1024x1024, 2048x4096 etc.) for memory optimization.
But, is it ok to store non-POT(non Power Of Two) sprites inside POT sprite-sheet?
For example, is sprite 123x86 considered optimized if it’s inside 512x1024 sprite-sheet?
3. I see that there is an option to use Packing Tag not only for sprites, but for Sprite Sheet(Multiple sprites) also.
I can’t understand when should I prefer Packing Tag over Sprite-Sheet with power-of-two size?
And does it make any good packaging POT sprite-sheet inside Packing Tag?
I tend to use 2560x1440 which my Nexus 6 uses, I’ve found that ok. When you pick a default resolution make sure it’s a power of two, eg. it evenly divides, you will not get all available resolutions looking good but it’s a start.
I think you’re saying to make sure “Reference Resolution” is even, because 2560x1440 is not a power of two AFAIK.
Also, lets lay, if you know that button will take 150x100 space on screen resolution 2560x1440, would you create your png as 150x100(px) and use this image for all resolutions?
And, I’m happy to listen to other answers if anyone wants to add anything.
I’ve investigated more and I think I can answer questions 1 and 2 (question 3 is still unanswered).
It seems that as of now the resolution of 2560x1440 proposed by piggybank1974 is suitable, because it’s the highest resolution, which is still common for tablets and phones.
IMO, the button should be designed for resolution 2560x1440.
And if it takes, for example, 120x90 space on such resolution, then this will be the size of button image used in sprite-sheet.
Yes, it’s ok to store non-POT sprites inside POT sprite-sheet, they are still optimized in memory, because they’re stored in POT sprite-sheet, which is the one that gets loaded into RAM.
There are many reasons for wanting to use Packing Tags for sprite sheets.
If you use TightRotateEnabledSpritePackerPolicy, you will most likely get far more sprites into a smaller Sprite Atlas than you would when using your own sprite sheets.
If you have had problems with artifacts at the edges of your sprites, caused by faulty sampling/antialiasing, this can be reduced or eliminated by using Sprite Atlases and adding padding to your sprites (you can change this in Editor Settings, it defaults to 1).
Since you want to get as many sprites as possible into each Sprite Atlas, it is a good idea to use the same Packing Tag for all graphics that is to be used within the same scenes. So, if you have single sprites or multiple sprite sheets and use Packing Tags Unity will try to get as many of the sprites as possible into as few Sprite Atlases as possible.