Use the original handling, walls and projection from the executable

Decoded from SKIDMARKS_CD32's machine code:

- Car physics: the per-frame engine/grip/steering update, gravity and
  jumps, the hill effect on the throttle, and body tilt. Replaces the
  reconstructed handling model.
- The meaning of every .set value (separate drag, grip and power for
  human and computer drivers; steering, gravity, tow hitch), and the
  six handling presets, offered by a new Handling menu option.
- Walls: the road edges are quadratic B-splines through the gates'
  ends. They match the painted road edges.
- The real projection, which lifts points by their height; the height
  map is indexed by world cells, not screen pixels.
- Tracks have one more gate than the stored count: the last gate was
  being dropped on every track.

Computer drivers now follow the road between the walls and steer like
the original's. Vehicle assets store the values as `handling`; older
files still load. Docs describe the decoded logic.
This commit is contained in:
2026-10-20 07:32:46 +00:00
parent ee895e0455
commit 6226c88d4e
44 changed files with 1283 additions and 791 deletions
+10 -16
View File
@@ -4,20 +4,14 @@ name MINI
driver ROB
# yes = towed behind cars (Caravans option) instead of driven
trailer no
# The 16 values from the original .set file. Their meaning is not
# decoded yet, so the game does not use them; the handling below is
# a reconstruction.
original 56 24 30 12 3 24 20 12 46 10 100 0 0 0 0 0
# top speed on tarmac, world pixels per second
top 190
# acceleration and braking, world pixels per second squared
accel 200
brake 320
# sideways grip (higher = less sliding)
grip 5.8
# steering rate, radians per second
turn 4.4
# weight in collisions
#
# handling: the 16 values from the original .set file, used as the
# original game does. Counting from 1:
# 1 2 6 computer drivers: drag, grip, power
# 9 10 11 human drivers: drag, grip, power
# 3 steering, 5 gravity, 7 tow hitch distance; the rest are unused.
# Top speed = power * drag / (64 - drag) / 32 world units per frame,
# 50 frames a second (drag below 64). Higher grip, less sliding.
handling 56 24 30 12 3 24 20 12 46 10 100 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 0.8
# speed and grip multiplier off the road
offroad 0.55