- Home /
2D platformer feeling
Most platformer programming tutorials use very simple controls (horizontal force is proportional to GetAxis("Horizontal"), vertical force is an upwards impulse applied when the spacebar is pressed).
However, the feeling i get from a character that moves that way isn't great. Is it just a matter of adjusting parameters or do developers usually implement more sophisticated controls for basic movement?
Answer by VeryAnnoyingCat · Feb 02, 2021 at 10:52 AM
The answers boils down to the timeframe and / or the scope of the game. For a sophisticated game or one that relies on platforming one should implement sophisticated controls for movement since it adds more juice to the game.
If you asking about the sophisticated controls, I recommend value based acceleration and deceleration. Not only do they improve the player's control, they also improve your control as the developer by opening up paths to varied interaction with different surfaces (eg. Ice, Mud). Jumps should increase with the time the key is held down.
Beware as more complex controls means more fine tuning, so for short games / game jams, stick with GetAxis("Horizontal") and AddForce(n * Vector2.Up, ForceMode2D.Impulse). That being said, game developers are rare entities and I have never seen one in its natural habitat so I don't really know what they do.