Improving the camera
In this latest build, I've implemented inverse kinematics on the camera.
Nailing the feel of an old console kart racer is very important to me, and camera response is a huge part of that. In games like Mario Kart or Diddy Kong Racing, the camera's rotation and response to player movement greatly influences the feel of the controls. Especially when dealing with analog steering input, having some ease in and ease out really lends to the feeling of actual steering.
Our intuition might tell us to interpolate between old and new positions. But since we only know the last and next position at any given time, we don't have much flexibility with lerps, which require a keyframe system to be fully utilized. Using lerps would leave us stuck using a decay curve, constantly subdividing, but never reaching it's destination.
Enter: Inverse Kinematics
Using some fancy physics, differential equations, and a shot of Jack Daniels; we can take our final position, and imbue it with some other values. I frankly don't have a complete grasp of how this works; so I'll give you the short and sweet and link to a good video at the end.
The idea is on every frame, to take our final position, and add a velocity and acceleration multiplied by some numbers usually less that 1. Our velocity is a derivative of position, or x' = x * delta / delta. Acceleration is a derivative of velocity, or x'' = pow(x' 2) / pow(delta, 2)
This guy explains it much better:
But anyway, new update is out. I think it improves game feel. And I hope to have some real levels made soon.This is in very early beta, but I would really ask you check it out. It only takes five minutes and I'd love your feedback; good, bad, or indifferent.
Files
Get Driving Test
Driving Test
This is a test for a driving game. Is being actively updated
Status | Prototype |
Author | OnTheRadio |
Genre | Racing |
Leave a comment
Log in with itch.io to leave a comment.