Platformer gravity where gravity is greater than tile size
- by Sara
I am making a simple grid-tile-based platformer with basic physics.
I have 16px tiles, and after playing with gravity it seems that to get a nice quick Mario-like jump feel, the player ends up moving faster than 16px per second at the ground.
The problem is that they clip through the first layer of tiles before collisions being detected. Then when I move the player to the top of the colliding tile, they move to the bottom-most tile.
I have tried limiting their maximum velocity to be less than 16px but it does not look right.
Are there any standard approaches to solving this? Thanks.