Improve your Platformer with Acceleration | Examples in Unity

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
Over the last two years, I've been trying to  replicate the stellar movement found in the best platformers And in a genre defined by how you move, fluid controls can elevate every aspect of design   I want to share my approach to movement starting  with platformer acceleration A character's run can be broken down into three phases: acceleration, max speed, and deceleration Together these core components defend the fundamental feel of your character Most developers begin with platformers that ignore acceleration. This is amazing for beginners  but in turn, you end up with a character that feels almost robotic to control We can do better When working with an engine like Unity, often the first solution that comes to mind is to adopt a physics-based approach However, using forces can feel really awkward and unresponsive we'll have the fluid move from aiming for but this isn't worth the trade-off in control The solution I've found is to scale the force applied to the player   by how close the speed already is to its maximum  This means if the player is already moving fast  we'll only play a tiny force On the flip side, if the player goes to turn we'll apply massive force   ensuring the change direction quickly. So our  movement is always snappy and responsive This works the same for deceleration. As a result we  won't even need any additional friction Ok, we've got a fluid and precise player perfect  so let's see what's possible with this alone   before expanding our controller even further  I find it great to look at some examples When designing your movement, studying Celeste can  be a great place to start    its superb balance of tight controls and elegant movement leads to an incredibly versatile player  First, though I want to dive into what each extreme on this scale may look like starting with Hollow Knight Oh and by the way, if you want to play along go check out  the demo link below Not all platformers revolve around precise platforming which is why hollow knight leans towards a much higher acceleration   Remember when I said many developers just  ignore acceleration? Well interestingly this is exactly what hollow knight does however this  is fundamental to the game's design by simplifying their game's movement team cherry allows the  player to feel in constant control even while airborne vital to the game's brutal boss fights  and reaction-based combat Okay before we take a look at the next game let's see what more we can add to our controller A great place to start is to dampen our acceleration when airborne This is a major part of why celeste was so great to play adding fluidity and contrast to the movement   If we dive into the game's code We can see acceleration has also decreased after being launched off a platform or performing a super dash Interestingly this allows celeste to play with momentum at the  highest skill levels whilst maintaining the responsive controls core to the game's design We can continue adding checks for other situations   maybe you want the players to feel more responsive  with the apex of their jump or if you've chosen a lower acceleration you can add a multiplier when turning let's take a look at a game like this In Super Meat Boy where you take a long time to reach max  speed this makes the character feel heavy to control   in addition to encouraging the player to maintain  their momentum. As a result games of this nature   can be some of the hardest to design for being  on the border of feeling unresponsive A lot of games will suffer from this take on movement yet  super meat boy and other games such as N++  highlight how the challenge of momentum can  lead to extremely satisfying gameplay Okay, with our run done what's next, there's still way  more to a great platformer and we haven't even  begun to touch on the most important mechanic  so click here to see part two why talk about the secrets to an amazing jump From how to increase his hang time just like in Celeste or Mario As well as incorporating wall jumps into our  physics-based approach For now until the next one
Info
Channel: Dawnosaur
Views: 51,289
Rating: undefined out of 5
Keywords: unity tutorial, unity 2d tutorial, unity platformer physics, unity advanced platformer, indie platformer game, better feeling platformer, unity physics-based platformer, platformer aceleration, unity platformer, platformer movement tips, improve my platformer, platformer controller, unity aceleration, unity 2d movement, ultimate platformer, game development, platformer movement, unity platformer tutorial, platformer, unity 2d, game dev, gamedev, unity 2d platformer
Id: KKGdDBFcu0Q
Channel Id: undefined
Length: 3min 11sec (191 seconds)
Published: Fri Jul 29 2022
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.