So i’m making a cartoonish and slightly realistic pixel platformer game.
I made the tiles 16x16, and the player is as wide as the tiles so 16x32. But now I feel like making it wider than one tile because I want to exaggerate the animations more.
Should platformer games have the player the same size as the tiles and not be taller? (Like my 16x32 player.). And is it fine to make the player 2 tiles wide? Is that too wide for precise movement?
(My player has dashing, sneaking, running, walljumping, and wallsliding.)
Hi,
There’s a huge difference between the player textures size and the player collision shape.
Precise movement, level design, and mechanics like dashing, walljumping, etc. are deeply related to the character collision/hitbox. You don’t even have to add textures, a simple rectangle would work and could be a playable character.
The textures are just a visualization for the player to understand what’s going on: seeing a character changing its posture is a direct feedback that it has changed its current state (from idle to running, or jumping, etc.).
To answer your actual question: what matters the most regarding level design is the collision shape of the character, that’s what will define how large/tall he is compared to the tiles. For instance, if the collision is 2 tiles wide, then if you want your character to jump between walls, you may need a minimum spacing of 4 tiles between these walls.
The texture sizes do not matter here. You textures could have a size of 64x64, as long as the character looks cool, feels cool, and as long as the player can understand directly what’s going on, then you’ve done a great job.
2 Likes
I forgot to mention I make my collsion shape the same as the player sprite. So basically if I make the sprite bigger then I will also make the collision bigger.
(And I didn’t mention that because I thought it didn’t matter.)
I believe you should not do that. There’s no technical obligation in doing it that way, and you will just end up struggling to get your player sprites right simply because you’re bond to a given size, whereas you could separate the two things so that they work independently. Obviously the character will need to fit its collision shape as much as possible, for gameplay clarity purpose, but, it’s perfectly okay to have some pixels going out of the hitbox if that makes the feeling more pleasant.
Is there any reason I’m not thinking of for you to work that way?
1 Like
Nope, there’s no reason that you’re not thinking of.
So I can make my player sprite 32x32 even if my tile is 16x16? But I will still make my collision shape 16x32.
2 Likes
Absolutely. My current game’s character prefab looks like this:
Not pixel art, but the idea is exactly the same: collision and visual do not have to be exactly the same size.
1 Like
I also make by characters 2 times a tile (two tile high and 1 tile wide). I can’t think of a reason this wouldn’t work.