Important notes about the visual showcases:
Left gif: I made the visual effects play that you can see when the player lands and grabs a vine, I made the branches (not the meshes) and I made the player itself.
Right gif: I made the double jump and implemented the pick up effect when you take the double jump powerup.
This section goes more in depth about how everything works, reasons why we did what we did and also shows some code.
One of the core pillars in this game was accessibility. This heavily influenced our approach on controls, focusing on making the inputs feel clear and fair, such as being able to buffer the input when trying to grab a vine.
Some checks for different things that can happen in the swinging state. The swinging state is active when the character is not touching a branch (ground).
The logic for the character running on the branches. The running state is active when the player is touching a branch.
The jump function. I continuously set the players vertical speed to the jumpforce while holding the jump input for a higher jump over time.
Some timers to check if the player can perform a jump after falling off a platform. This is to make the platforming experience more forgiving and feel nicer.
Ground check for the player character. There were some issues when I tried using a raycast, on slopes it would sometimes not detect the ground. Therefore a boxcast worked better.
Detecting the vines was a simple collision check, but we wanted to make grabbing the vines feel smooth and fair. To achieve this, we cached certain information about the vine you were near and set some references. This, in combination with storing whether the grab input is held or not, allowed the player to hold the button before reaching a vine and grabbing it immediately when it's possible, removing potential frustration with timing when grabbing the vine.
When you collide with a vine, we save the object, the interface telling the character that it can swing on that object and tells the character that it can interact.
When exiting the vines collision we reset these values to default.
The press functions for both buttons.
The release functions for both buttons.
Making sure some effects are placed correctly.
The effect on the character when the character has picked up the double jump powerup.
I also worked on some things for the branches, such as exploring using splines to move the player accurately across the spline. I don't remember if we ever ended up using that or not, so it's not worth having its own section.
I believe the most important thing I learnt in this project is the fact that it is really important to maintain a good structure when working. I did not do this, not when starting out either. Mostly due to not thinking ahead and considering all of the things we would need, but eventually I ended up having everything related to the player in one 500 line long script. Animations, VFX, movements, states, everything in one script. It was super chaotic and made it a lot harder to work on.
Evangelia Bakasi