Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I took a look at what's a part of my car controller[1] if you want some inspiration. A lot of these wouldn't make sense in an F-Zero type game

- 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...



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: