Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

What is sensible gravity in a 2d game movement? Would it be to have a maximum vertical speed? I have always had a somewhat crude mobility when trying to make platform games.

Well there are two components, the jumping and the falling.

For the falling I just have a gravity value that is quite fast so it feels somewhat realistic. Gravity is added to the player's delta y each frame, so that it accelerates.

For the jumping I allow the player to do small jumps or large jumps depending on how long they hold down jump for. I do this with a jump power value which starts fairly high and decreases as the jump button is held down until it reaches a certain minimum value and then falling begins instead.

It's also possible to have a maximum falling speed (terminal velocity) that cannot be exceeded so if the player falls a long way they don't move so fast that they clip though platforms.