Hello and welcome to another installment of the Blightmare Dev Blog!  Before we jump in, I want to say that all of us here on the Blightmare team wish you health and safety in this time of great uncertainty.  We hope that these blogs can do a little bit to change the subject and offer a small semblance of normalcy.

I have wanted to do a post on jumping for some time now, but I didn’t really know exactly what I wanted to say or how to present it.  I still don’t know either of those things, but it seems like this is as good a time as any.  It’s likely that I’ll return to the topic in the future when a better way identifies itself.  Anyway, jumping is of course one of those critical components to any platformer.  When we started on Blightmare, I naively thought that jumping was one of those solved problems where you just go read how to do it and that’s that.  Boy was I wrong.

During an entire play through of a platformer, we would expect a player to jump thousands of times.  Doing something so often means that it has a lot of pressure to feel good and be something that the player wants to do.  It also means that it has to be very precise because a player will learn how the jump behaves and will eventually rely on this knowledge to master the game.  There are further constraints put on the jump from the design side: how high can the player jump, how far does a player go in a jump, hang-time, maneuverability in the air, etc.  All of these factors have to mesh together into the jump.  Looking at existing legendary platformers for help just underscores how the jump really defines the gameplay.  For example, look at the wide variety of jump behavior between Mario and Super Meat Boy.

(Image credit: Martin Fasterholdt.  http://martinf.dk/jump/Jumping_Thesis_Fasterholdt_09.pdf)

Notice how the maximum height is nearly the same between Mario and Meat Boy, but the hang time is massively different.  It’s also important to notice that the Mario curve is not symmetric – the time to land is shorter than the time to take off – while the Meat Boy curve is very close to symmetric.  These are all important properties to determine what people call the “feel” of a jump as well as tools that can be used to showcase the level design.  In a game like Mario, the total jump time is relatively short and the landing time is especially short which means the player needs to plan their takeoff point well because it is very difficult to correct for any mistakes once the jump has started.  In a game like Super Meat Boy however, the significant hang time and air control allow much more flexibility over the final landing point of a jump.  These factors all have significant implications to obstacles or other mechanics that are traversed via jump combinations.

Moving over to Blightmare itself, we have actually gone through at least 3 implementations of Blissa’s jump that have been played by people outside of the team.  The early feedback we received is that the jump was “floaty” and a bit “loose”.  As the programmer behind the jump I wasn’t exactly sure what these words meant in terms of actual implementation changes.  Recall that Blightmare has a jump mechanic where holding down the jump button for some time will achieve a higher peak altitude than a quick tap.  The first implementation of this that I did dynamically adjusted the initial conditions of the jump as input was detected over the jump height window.  The simulation then worked out what the current state should have been had the initial conditions been different, and set them to match.  I thought this was a pretty clever implementation because it only needed a few parameters from the designers to then solve for the actual configuration – and it was able to smoothly interpolate through any portion of the input window.  This was one scheme that was determined to be “floaty”.  The next scheme was quite a bit simpler.  Here, we just added some acceleration over time to control the final height of the jump.  This was also “floaty” and I was finally able to determine what I thought was meant by this.  To test my hypothesis, I decided to make a little simulator to help visualize what was going on.

The “Jump Graph” tool is just a spreadsheet that plots height over time and gives additional information like maximum height and hang time.  The simplest jump is just a parabola.  This is what you get with just an initial velocity impulse:

Notice that this looks a lot like the Super Meat Boy jump from above.  Adjusting gravity relative to the initial velocity makes it possible to control the total hang time and maximum height – squish or stretch the curve as well as set the height.  This is not what we had in Blightmare though.  We were actually adding some acceleration during the jump.  When I plugged in what we had, it looked approximately like this:

Notice how the peak is achieved early in the total jump time?  I believe that is the way to quantify what “floaty” means.  Put another way, the character spends more time descending than it does ascending.  So now that I had this information, I set out to make a jump curve that did the opposite:

This is rather extreme however, and it felt really punishing to play.  The slope at the start also almost has an inflection point which feels a bit strange.  After doing a bit more tuning and playing around, I came up with this shape:

This is what we have right now.  It’s a bit less harsh while still giving that “weighty” feel of peaking more than half-way through the jump.  I should note that I also experimented with various methods that actually used variable gravity values to achieve similar jump shape changes, but this made it more complicated to keep the player coherent with other physics based mechanics so I opted to not do that.

I’m sure I will have more to say about the jump in a future post, but in the meantime, here’s a couple videos visualizing some of the attributes of Blissa’s jump in game:

Thanks for reading and please head over to the Steam page to wishlist and follow us on Twitter to stay up to date!  Stay safe out there.