Correct pixels per unit based on existing assets

Hello, in the current game I’m making I have:

  • A player, each sprite occupy 64 pixels
  • A tileset, each sprite occupy 16 pixels

At first, I had the player configured with 100 pixels per unit and the tileset configured with 16. The tiles were incredibly big compared with the player.

After tweaking, I have set:

  • The player configured with 16 pixels per unit
  • The tileset configured with 16 pixels per unit

Now everything is scaled and works well, but I wanted to ask if this is the right way to configure stuff, or is there any other recommended setting based on the size of my assets?

Changing pixels per unit is a fine way to go, as is changing the scale of things in your scenes.

I would try NOT to mix-and-match those things if at all possible, just because it makes a mess: Let’s say today you decide to shrink your character down so you make him 50% in size. Tomorrow you decide to increase his size so you change the sprite pixels per world unit… now you have a real mess to figure out what is going on.

The short answer is: yes, 16 is just right.

The easy way to think about it is that PPU defines what ‘one meter’ is. If you create a 3D cube for example it’ll have a scale of (1, 1, 1), meaning it’s basically one meter in each direction (the value is pretty arbitrary, but as I said it’s the easy way to think about it). So when you define a PPU of 16, that means that 16 pixels in your image are now one unit, meaning one meter. 32px would be two meters and so on.

So by giving your tiles a PPU you basically say that one tile is 1x1 meters. And I’m guessing your character is somewhere between 16 and 32px high? Because that’s what would make sense to me scale-wise and it’s what most games do.

Yes @Zephus , each tile is 16x16 and the character sprite is 64px, but there are empty space arround him, he’s actually arround 32px high.

Thanks for the help.