Double Jumping


This update ended up being larger than I anticipated. The feature I set out to implement was double jumping. My goal was pretty simple, if the player is in the air and has not already double jumped, they press the jump button to execute a double jump.

Getting this behavior working was pretty easy, I just needed to add a few flags to determine if the player could double jump. Then, if the player pressed the jump button and could double jump it would execute a second jump.

The issue that I noticed here was that the double being implemented as a second mid-air jump didn't look good. The jump feedback is supposed to look like the player kicked up dust from the ground. This works for the initial jump but makes no sense for the double jump. Because of this, I started thinking about how the double jump would physically work. The easiest explanation was magic. I tried thinking in DnD terms. Someone might double jump by jumping, then casting Tensor's Floating Disk mid-air. They could then jump off the floating disk to execute a second jump. That led me to the idea that double jumps will be a spell that creates a momentary disk of force that the player uses to execute a second jump.

I feel that this works for two reasons. First, the ability being a spell allows me to start the player off without this ability. It has a huge impact on the player's mobility, so it would complicate learning the basic controls of the game. Second, it makes the rules of the jump and double jump consistent because the double jump is physically a normal jump. This means a double jump can follow the same variable height jump rules and a double jump can be used to adjust the player's jump inertia.

I created some VFX that are unique to the double jump and was happy with the result. I was looking at the material preview for the double jump texture (what is referred to in the repository as the double jump magic circle) and thought it looked pretty cool mapped to a sphere. This led me to create an unexpected mechanic: spell orbs.

Spell orbs are an environmental object that triggers an ability on collision. I think I can use this feature to tutorialize new abilities in an interesting way. Rather than giving the player the new ability and running them through challenges that are similar to learning the basic controls, I can put the spell orbs into a level that demonstrates how to use the ability before the player acquires it.

For example, I can have a level that has several double jump related challenges. One good example is the player reaching a platform directly above them. The player will have to jump into the double jump spell orb, then reverse direction to land on the platform. This will teach the player that double jumps can be used to change direction in mid-air. After completing a set of challenges involving double jump spell orbs, the player unlocks the ability to perform double jumps whenever they want. Now, I can drop them back into a space where they can experiment double jumps, but the player will already have an understanding of how the mechanic works.

Additionally, later on in the game, I can use these double jump spell orbs to create more interesting platforming challenges. For example, there may be a sequence of spell orbs that the player has to hit in succession to cross a gap. I tried to capture this idea in the demo level.

After I finished up double jumping I did some general refactoring of the project. I also revisited aim-locked movement. I'm planning on implementing a combat system in the game that will make heavy use of aim-locked movement. The next major steps in the game are to implement basic combat and redesign the test level.

For the redesigned test level, I'm considering a derelict fort. The player starts in a courtyard where they experiment with basic movement and progresses into an interior section where double jumping is introduced. The resolution of this section is the unlock of double jumping. They are then dropped back into the courtyard where they will be able to experiment with double jumping. The double jump allows them to access the other side of the fort where hazards and combat will be introduced.

I'm also starting to work on a separate debug scene for quickly testing game mechanics.

Files

vaults-and-vampires-webgl.zip Play in browser
Version 2024-01-28-d95ad3c Jan 28, 2024

Leave a comment

Log in with itch.io to leave a comment.