{"id":285,"date":"2018-04-16T16:07:15","date_gmt":"2018-04-16T16:07:15","guid":{"rendered":"http:\/\/www.radicaldog.com\/blog\/?p=285"},"modified":"2018-05-26T13:13:50","modified_gmt":"2018-05-26T13:13:50","slug":"6-ways-to-improve-2d-jumping","status":"publish","type":"post","link":"https:\/\/www.radicaldog.com\/blog\/6-ways-to-improve-2d-jumping\/","title":{"rendered":"6 ways to improve 2D jumping"},"content":{"rendered":"<p>In <a href=\"https:\/\/radicaldog.itch.io\/platformer-mixtape-2010\"><strong>Platformer Mixtape 2010<\/strong><\/a>, I parodied several games including the excellent <a href=\"https:\/\/www.youtube.com\/watch?v=snaionoxjos\"><strong>Super Meat Boy<\/strong><\/a>. This meant getting the jumping physics &#8220;just so&#8221;, or the game would be crap. This is a collection of my thoughts on what makes a good jump or wall jump.<\/p>\n<p>1. <strong>Momentum is harder to change in the air.<\/strong> If you turn left or right on the ground, the reaction should be almost instant. However, in the air it should be looser, unless your character has wings.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/i.imgur.com\/mGOMGWw.gif\" width=\"294\" height=\"233\" \/><\/p>\n<p>The difference is subtle, but it&#8217;s very noticeable if it&#8217;s not there!<\/p>\n<p>2. <strong>Hold jump for a bigger jump.<\/strong>?Lots of people implement this by making the jump &#8220;stop&#8221; as soon as the jump button is lifted, but this is a mistake. Both small and big jumps should look natural.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/i.imgur.com\/40opBhY.gif\" width=\"294\" height=\"233\" \/><\/p>\n<p>In my game I reduce gravity while the jump button is held. However, given more time I would have also added a bigger difference in jump power if the player only taps &#8216;jump&#8217;.<\/p>\n<p>3. <strong>One press = one jump.<\/strong> I made mine extremely forgiving, as you can press before you touch the ground &#8211; making jumps frame-perfect. However, if you hold jump and your character jumps again when they land, that&#8217;s a bug not a feature.<\/p>\n<p>4. <strong>Wall jumps should be forgiving.<\/strong> I hate when a game demands that I be pushing into the wall or the wall jump fails. I manage this by having trigger colliders that extend beyond my character collider, so that a wall jump can be triggered while moving away from the wall.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter\" src=\"https:\/\/i.imgur.com\/h6s1APK.png\" alt=\"Triggers extend beyond the character\" width=\"256\" height=\"263\" \/><\/p>\n<p>5. <strong>High gravity is harder, but often more fun.<\/strong> It can make a game feel more alive and challenging, but high gravity is not appropriate for every type of game! If you&#8217;re making a puzzle-platformer, you&#8217;ll need to find a balance.<\/p>\n<p>6. <strong>Wall jumps combine all of the above.<\/strong> You have to decide what sort of shape your wall jumps should have, and adjust the gravity, momentum, kick-off speed, and held-jump power to make sure it feels satisfying. There&#8217;s no &#8220;right&#8221; answer here, but there are a lot of wrong ones!<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-medium\" src=\"https:\/\/i.imgur.com\/lCfshE1.gif\" width=\"294\" height=\"233\" \/><\/p>\n<p>Hope you&#8217;ve enjoyed this list-orial. Follow <a href=\"https:\/\/twitter.com\/connectoffline\">@connectoffline<\/a> or subscribe here to see what we get up to in this weekend&#8217;s <a href=\"https:\/\/ldjam.com\/\">Ludum Dare<\/a>, and more.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In Platformer Mixtape 2010, I parodied several games including the excellent Super Meat Boy. This meant getting the jumping physics &#8220;just so&#8221;, or the game would be crap. This is a collection of my thoughts on what makes a good &hellip; <a href=\"https:\/\/www.radicaldog.com\/blog\/6-ways-to-improve-2d-jumping\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":-1,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[17],"tags":[],"class_list":["post-285","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-tutorials"],"_links":{"self":[{"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/posts\/285","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/comments?post=285"}],"version-history":[{"count":2,"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/posts\/285\/revisions"}],"predecessor-version":[{"id":341,"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/posts\/285\/revisions\/341"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/media?parent=285"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/categories?post=285"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.radicaldog.com\/blog\/wp-json\/wp\/v2\/tags?post=285"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}