Posts

Showing posts from November, 2021

Combat System Update 3

Image
 I updated the combat system again, really focusing on making it more interesting. This mainly consisted of small tweaks. On ground attacks now push the enemy in the direction of the attack. Ground attacks can also juggle enemies that are already in air, but might be a little hard to see on the fly trap enemy. I implemented the new jump that I mentioned in an earlier post and it allows the player to jump faster and fall faster compared to the enemy.  Some attacks do a "float" where the vertical velocity is 0 for a certain amount of time or some do a "bump" which is a very small launch. Most ground attacks are bumps. I'm planning to put the launch attacks on their own separate button later on for ease of use (right now they're part of the combo). This is variable for different attacks. Combo canceling happens if the user double taps a directional arrow. In addition, I've changed up gauntlet's air attacks, added particle effects to the gauntlet attacks

Returning to the Combat System: Launching

Image
I wanted to increase the speed of the initial launch for the jump. The launch system in my game is set up so that I can specify a launch type and the launch type is described by a math function. So I played around with some math functions and the function I found fit my needs the best was an arctan function shifted slightly so the rise starts near or a little past 0. However, there was also the issue that this function does not return downwards and going from one type of jump to another results in choppy movement. So I ended up adding a parabola so it was carctan(cx) + c + gravx2 + cx + c where c is some arbitrary constants (not all the same). I had to play around with the constants to get the height I wanted. This allowed me to get a fast jump upwards but a gradual descent downwards. Red is the arctan + parabola and blue is the original launch function (just a parabola). Note: This arc shows y position over time.