|
|
|
|
|
by bemmu
848 days ago
|
|
What would be “minimal viable vehicle physics”? I’ve been prototyping an f-zero type game and so far have: - pressing forward increases thrust - thrust makes vehicle accelerate forward - friction is higher for the component of velocity perpendicular to tires - vehicle turns faster when it is moving faster (I don’t actually simulate tire direction) - as a hack to make it feel a bit like drifting, make the vehicle visually turn more than it is actually turning Any simple thing I should add? |
|
- Wheel modifiers (which wheels are on road, grass, boost tiles, etc)
- Control loss when airborne
- Slow turning when at low speed (a bit different from yours since the impact drops to zero very quickly)
- Speed / accel penalty when hitting a wall
- Visually rotating the car (this is what happens when a player presses the turn key but the actual velocity rotation is handled separately)
- Boost handling
- Nudge the car to the side a little if it's trying to turn but is blocked by a wall
- Acceleration, friction, breaking, and drift-breaking
- Corrective side force (basically an extra friction perpendicular to velocity like you have)
- Artificial speed limit (alternatively, you can include a drag component which applies a force proportional to the square of speed, but I've found it hard to get this feeling good in the past)
- Velocity rotation to align velocity direction and visual direction. This is a minor effect - it's mostly handled by the other physics
- Gravity
- Out of bounds checks
I think you've got the main pieces already. What's more important is understanding what you want your game to feel like and continuously tweaking until you get there
[1] https://github.com/maxbize/PICO-8/blob/master/Driftmania/dri...