- Home /
Multiple resolutions considerations for Sprite Manger 2
I have been trying to figure out a relationship between orthographic size and positioning/ sizing of textures and resources in Unity3D 2D games using Sprite Manager 2 but I can not get it somehow.
I have tried experimenting with Sprite Manager 2 and EZ-GUI and in their examples/demos screen controls and positioning automatically updates when I change screen resolution like from (960x640) to (480x320). But surprisingly they are using Perspective Camera and not Orthographic camera in those examples.
What I need to know is how you guys target the problem of multiple resolutions in 2D Games. What is the connection between Orthographic size and and object being rendered as 2D PackedSprite in Sprite Manager. And if I use Perspective Camera what is the connection between Field of view and the sprite size. Where should I ideally put all my sprites so that position updates are easy.
When should I use Perspective camera for 2D games and how should I determine what Field of View value be set there.
Does anyone use EZScreenPlacement in SpriteManager 2? I think it adds a lot of dependencies and we have to add it to every sprite which makes it quite tedious to use.
I want to know what the experienced game developers in 2D games in Unity3D use as a strategy for SPRITE SIZING and POSITIONING to target multiple resolutions. I am just not sure when to use PIXEL PERFECT and admittedly I don't want to use pixel perfect because no matter what it draws a texture on the same pixel by pixel ratio on any sort of resolution and we have ranges from 480x320 to 2048x1536.
I don't have all your answers, so I'll put this here as a comment.
Orthographic size is 1/2 the vertical size (world units) seen by the camera. It doesn't matter what resolution you have, the vertical world units will be the same. With pixel perfect turned off, the size you specify for your packed sprite will be in world units. For example if you sized a sprite to fill the vertical frame, then that sprite will fill the vertical frame on all devices. As for a perspective camera, the same hold true. A packed sprite to just fit vertically will fit on all resolutions.
I use Pixel Perfect as an authoring tool. I pick one resolution to author to and setup that resolution in the editor. I can then click Pixel Perfect on and then immediately back off and have the image pixel perfect for that resolution. It will be sized "appropriately" for other resolutions. You can also use Tools/AB Software/Size Sprites to set the size to pixel perfect. As you've noted, you don't want pixel perfect turned on if you are authoring for such a wide range of devices.
If you use EZScreenPlacment, you'll likely need some additional scripts. EZScreenPlacement uses pixels. So unless you are anchoring things directly in the corners, you'll need to adjust the number of pixels for different resolutions.
Your answer
Follow this Question
Related Questions
How do I control the camera position (in between borders)? 1 Answer
How to make the Health bar on Enemys head not be in relation to Player(main) Camera? 2 Answers
Change the background color attribute of a camera in C#? 2 Answers
How to get the position that is closest to a target within a given radius 0 Answers
player goes crazy when using this, help! 0 Answers