[ad_1]
Topic:
The theme of this month’s project was “Movement Experimentation”. Celeste is one of my favorite movement-based games, both as a casual player and as a speedrunner, so I wanted to see how difficult it would be to recreate some of the more advanced dashing mechanics like Super Dashes and Wavedashes.
Basic Movement:
My goal was to replicate Celeste’s system of jumping and dashing inherently, without having to specifically program each special interaction. I couldn’t get this to work for everything, but I decided to use a RigidBody and apply forces to it as the primary method of movement (I thought this would fit Celeste’s system because it also seems primarily force-based). I messed around with the AddForce method until I was happy with the results.
I also had to adjust the RigidBody’s angular and linear drag. Since the player is a circle, it rolls on the ground, which wasn’t really my intention, but I liked the look of the circle, so I maxed out the angular drag to make it feel more like a “human” instead of a ball.
Like Celeste, you can dash in all 4 cardinal directions, and diagonals.
Advanced Movement:
There are some advanced techniques in Celeste that require both jumping and dashing with precise timing and direction. The two I wanted to implement were Super Dashes and Wavedashes. However, they weren’t emergent with the basic force methods I used, so I had to implement them manually. I kept track of the player state, and if the player was still dashing when they jumped (plus a small window for leniency), they would get the modified AddForce values instead of the usual jump values.
A Super Dash just involves jumping immediately after you dash forward on the ground. It gives you a slight speed boost and height boost, compared to just a normal jump/dash.
A Wavedash is similar, but requires dashing diagonally into the ground from the air, then jumping. It doesn’t provide as much of a height boost, but gives even more of a speed boost.
[ad_2]
Source link