I just got into making a pixel art platformer for fun and I wanted it to work so that I could have a scrolling parallax background and also a tile set for the actual level to be played on. I originally drew my background parallax art on a 320 by 180 canvas because I had seen it recommended, and when I imported the layers into the game I used 100 PPU. I obviously want this game to be 1920 by 1080 and it seemed like unity could do the scaling itself when I went to game view and put full HD, but here’s where I started to have problems.

If I bring in a 16 by 16 tile set and set the tiles ppu to be 16, they are huge in comparison to my pixel art background. I’m guessing this is because each unity unit is getting filled with 100 pixels with my background, but only 16 with the tile set making the scaling bad. If I wanted to keep a consistent 16 ppu then I’d have to change the background to import at 16 ppu but when I lower it below 100, it just begins to zoom the image in pretty much and cut off parts of it instead of actually making it fill out more space. Why is this and how can I fix this or go about sizing things correctly in this situation? I’d be willing to provide anything extra if needed. Thank you in advance.

  • \$\begingroup\$ Adjust all PPUs to 100 and set Camera.orthographicSize to 0.9. \$\endgroup\$
    – Mangata
    Commented Feb 7 at 8:06
  • \$\begingroup\$ PPU means pixel per unit. If your game is 10 units high, when you assign 16 PPU to your tile, you are allowing unity to upscale the 16pixel tile to 108 pixels. There is one more information missing in your question, are you having a canvas in the mix, canvas only or only just tilemap? \$\endgroup\$
    – Zibelas
    Commented Feb 7 at 10:37
  • 1
    \$\begingroup\$ Can you explain your desired outcome in more detail? It sounds like you want your background to "fill out more space" but it's not clear how one would do that without the "zoom the image in" look. Filling out more space and zooming in both mean the image gets bigger on screen / occupies more screen pixels, no? Can you illustrate how you want this to be different, like perhaps mocking up a fake screenshot in a paint program? \$\endgroup\$
    – DMGregory
    Commented Feb 7 at 11:14


You must log in to answer this question.

Browse other questions tagged .