barebops.blogg.se

Best 2d unity games
Best 2d unity games





best 2d unity games
  1. #Best 2d unity games 720p#
  2. #Best 2d unity games 1080p#

You can use Unity's asset bundle variants to handle the swapping, as described in this article.Īs an example, we might make two versions of a tile sprite: one 72 pixels tall and one 150% larger, 108 pixels tall. The most flexible solution, but also the most work, is to produce sprites at multiple resolutions, and select a different asset and its associated PPU setting based on your display dimensions. If you need room for UI or on-screen controls, this can be a good place to stick that content so it's not covering gameplay area and so the padding itself is less objectionable. This might be OK for a retro-style pixel art game, but if you're shooting for an HD look then it may not be what you want.Īnother option is to change your camera settings based on the display resolution, adding padding or letterboxing on larger displays so you keep a 1:1 rendering ratio without changing how much level area is visible. But we had to sacrifice a lot of detail to do it. If we imagine we're rendering to an imaginary 360 pixel screen, then we can display that at 4x scale to hit 1440 and 3x scale to hit 1080 while keeping everything crisp. We can solve it by dropping down to a lower res that's a common factor of the two display resolutions we're targeting. Players on the S7 will see more of the level than iPhone players, and that might not be fair. 1080 ÷ 144 PPU = 7.5), which is going to change how the gameplay feels. If we reduce our camera size from 5 to 3.75 we get back to 1:1 rendering, but now we only see 7.5 units of our world vertically (eg.

#Best 2d unity games 1080p#

Same goes for the smaller 2:1 options described above: porting them naively to 1080p gives us a 1.5:1 ratio. If we don't change anything, then our 1:1 rendering from the 1440-line screen becomes an 0.75:1 screen pixels per sprite texel ratio on the 1080p screens - not an integer anymore, which means we're going to get artifacts. These phones use the same 16:9 aspect ratio as the Galaxy S7/Pixel XL, but at 1920x1080 resolution. Let's say we want to run this same game on the iPhone 7+, or the (non-XL) Google Pixel phone. This is where things get really complicated. What if we want to support more than one resolution? Doubling (or tripling) pixels keeps your art looking crisp after upscaling with nearest neighbour filtering, while still offering an acceptable level of detail on high-dpi devices typically.

#Best 2d unity games 720p#

Try mocking up an example level and scaling it to how you want it to look on your device - that will help you identify what world unit scale is right for your game.Ĭonsider too that rendering native res might be a bit too performance/battery intensive on some devices, so rendering to a 720p buffer & dropping to 72 pixels per unit (or 90, or 60.) is also an option, giving us 2 screen pixels per sprite texel. That means there's no one standard PPU setting - it's going to depend on how you want your game to look.

  • Or maybe you want a bit more room to play in and would prefer 120 pixels per unit to fit 12 units vertically (1440 ÷ 120 = 12) and a camera size of 6.Įspecially if your level art is tile-based, knowing how many tiles you want to fit on screen is key to selecting an appropriate resolution and PPU setting for your assets, so you can keep a convenient mapping of 1 world unit = 1 tile.
  • Then you could use 180 pixels per unit instead (1440 ÷ 180 = 8) and a camera size of 4.
  • Maybe for level design & UI layout reasons you'd prefer to see 8 game world units vertically instead of 10.
  • Of course this isn't the only size we could choose - 144 was completely arbitrary. Unity's cameras take their size in half-extents along the vertical axis, so that means we'd set our orthographic camera size parameter to 5 (half of 10) 2.

    best 2d unity games

    (1440 ÷ 144 = 10) Assuming we want to draw at native resolution (more on that below) So with our 144 PPU that means we'd want to show 10 game world units vertically to get a 1:1 screen pixel per sprite texel ratio on these devices. The Samsung Galaxy S7 or Google Pixel XL have a resolution of 2560x1440 in landscape mode. If we get a fractional ratio here it can cause unsightly artifacts. To keep our art looking its best, we need to work out an (orthographic) camera size that will map each sprite texel to a whole number of screen pixels. Given a Pixels Per Unit number (PPU), how do we avoid "anomalies"?

    best 2d unity games

    Google recommends icons be 144 pixels on xxhdpi displays, so let's arbitrarily choose that as a starting point for our PPU scale and see where this leads us. I think the "why' of this will be a bit clearer if we work through some examples. As described in a comment above, there's no one simple answer for what sprite resolution or Pixels Per Unit (PPU) setting to use.







    Best 2d unity games