Devlog #3: Roundhouse Kicks
There are two ways to destroy your opponents in Kalimpong: you can hit them with a projectile or you can just smash into them. While boosting or driving through your opponent is satisfying, I thought it would be fun to have a dedicated melee attack, so I introduced a kick move.
The first kick that I wanted to try to emulate was a wheel kick. To get started, I broke the rotation that I wanted down into discrete steps. The back left or right wheel is going to be the “foot”, so I needed that to come up while the vehicle reaches a 180 degree rotation around its vertical axis (so it's facing backwards). Then I want the back wheel to cut across the target and down as the vehicle returns to its original orientation (facing forward).
To implement this, I added a 3D vector to the vehicle’s JSON config file to describe the angular velocity of the kick, which would allow me to test and change that force quantity rapidly.
When you hit the kick button the vehicle applies this angular velocity. Putting it in a config file means I can change it without having to compile any code, because the vehicle reloads the config JSON file whenever it respawns.
Beyond fine tuning the angular velocity values to get the spinning motion right, I added a little hop and some forward movement The jump gives the vehicle time to perform the kick, and the forward movement adds power to the attack.
There was a problem with the first version of the kick. Applying linear and angular velocities that achieve the right look and also let the vehicle land assumes that the terrain is flat, which it rarely is in Kalimpong.
The problem here is that the kick maneuver is such a small vertical jump that I didn’t bother to have it engage the vehicle’s auto landing system. That means that If the terrain it was landing on wasn’t the same elevation or rotation as the terrain from which it jumped, the vehicle would stumble.
To fix this, I needed more control over the move while it was in progress. I introduced a timeline so I could think about the kick in phases. The first quarter second would be the attack, and the second quarter second would be the recovery, and the last half second would be the auto-landing stage.
In the first phase, the vehicle accelerates its angular velocity to give the kick some power. When the second phase begins, the angular velocity is significantly reduced -- but not zeroed -- and the autolander is engaged so the vehicle can land smoothly.
The next step was to integrate this into the vehicle on vehicle collision handling system so you can destroy other vehicles with it. That system is velocity based, and the kick move creates a lot of forward momentum, so without changing anything, landing a kick usually destroyed your target. However, there were still some situations where you would kick cleanly but due to the angle, or their speed, you wouldn’t cross the necessary impact threshold to destroy them.
To address this, I added a little extra weight to the impact score for a vehicle performing a kick. This way, if someone hits you from behind while you’re kicking you won’t automatically kill them (since most of your force is moving away from them), but if you hit someone relatively cleanly you should destroy them.
After some playtesting it became apparent that it would be cool if you could kick incoming projectiles away, the same way you can shoot them down. Thinking about how to implement this also coincided with the introduction of the lateral boost dodge, which seemed useful but was hard to pull off.
What was happening was that even if you saw an incoming projectile and reacted with a kick or a lateral dodge, you were often still destroyed. It was frustrating because you did actually act skillfully but you still lost the encounter. We decided to give your vehicle a short, 1-hit shield during lateral dodges and roundhouse kicks.
This ended up being a nice solution. If you reacted well you could survive an otherwise deadly impact. Your opponent can still counter with two consecutive hits, but that requires some skill too. Introducing the ability to play a little defense made combat much more interesting and a lot less random.
King of Kalimpong
Multiplayer vehicle combat
Status | In development |
Author | piinecone |
Genre | Action |
Tags | Cute, Driving, Low-poly, Physics, Third-Person Shooter, Twin Stick Shooter |
More posts
- Devlog #5: Level Design and UI ProgressOct 04, 2021
- Devlog #4: Auto Landing SystemSep 24, 2021
- Devlog #2: Weapon BoostingSep 13, 2021
- Devlog #1: Speed, Level Design, and Camera BugsSep 09, 2021
Leave a comment
Log in with itch.io to leave a comment.