Use the original computer drivers, car collisions and towing

Decoded from SKIDMARKS_CD32:

- Computer drivers: the path of nodes laid 2 game units apart along
  the middle of the road, with side points 1 unit in from each wall.
  Drivers aim four nodes past where they'll be in four frames, or cut
  to the other side two nodes on at 70% throttle when running wide.
  Replaces the pure-pursuit AI; laps are quicker on every track.
- Collisions: six points on the player's car (corners and sides, from
  .set words 6 and 7, now known to be half-length and half-width) are
  tested against the other car's box. Hits push the cars apart with a
  strength that grows with their speed difference, and spin the car.
  As in the original, only human players' cars collide; cars at
  different heights don't.
- Towing: the hitch is at the car's back, the caravan sits 0.656 units
  behind it, and past 90 degrees both car and caravan bend back.

The reconstructed collision weight (`mass`) is gone; old asset files
with it still load.
This commit is contained in:
2026-10-20 10:15:33 +00:00
parent 54e146ce36
commit a4445d521f
18 changed files with 511 additions and 253 deletions
+5 -6
View File
@@ -103,7 +103,6 @@ The display name, driver and handling:
| `driver` | driver's name, shown next to it |
| `trailer` | `yes` for something towed behind cars (the caravan) rather than driven |
| `handling`| the 16 values from the original `.set` file, used as the original game uses them (below) |
| `mass` | weight when cars collide; not from the original data |
The `handling` values, counting from 1:
@@ -113,8 +112,8 @@ The `handling` values, counting from 1:
| 9, 10, 11 | human drivers: drag, grip, power |
| 3 | steering: 16 = 1/64 of a turn per frame at full lock |
| 5 | gravity: 8 = 1 pixel per frame² |
| 7 | tow hitch distance behind the car: 2 = 1 world unit |
| 4, 8, 12–16 | unused |
| 7, 8 | half the car's length and width, for collisions: 2 = 1 world unit. The tow hitch is at the back. |
| 4, 12–16 | unused |
What the driving values do:
- **Drag** (below 64): how much of the engine's speed survives each frame.
@@ -128,9 +127,9 @@ What the driving values do:
The menu's **Handling** option can replace every car's values with one of
the original's presets.
Older files with `original`, `top`, `accel`, `brake`, `grip`, `turn` and
`offroad` lines still load: `original` is read as `handling`, and the
others are ignored. To add a car, add a new `<id>.png` / `<id>.txt` pair.
Older files with `original`, `top`, `accel`, `brake`, `grip`, `turn`,
`offroad` and `mass` lines still load: `original` is read as `handling`,
and the others are ignored. To add a car, add a new `<id>.png` / `<id>.txt` pair.
## Sounds: `sounds/*.wav`
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 54 35 32 8 7 22 22 16 49 14 53 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 1
+2 -3
View File
@@ -9,9 +9,8 @@ trailer yes
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 2 65532 65532 1 12 10 16 14 0 0 0 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 1
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 15 14 34 8 4 598 15 12 13 4 2003 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 1.4
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 60 71 30 0 6 16 24 12 58 42 29 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 0.9
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 51 21 30 16 3 45 16 13 44 13 93 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 0.85
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 34 22 6 2 15 19 11 49 14 44 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 1.2
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 34 22 6 2 15 21 12 49 14 44 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 1
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 55 26 28 18 2 29 20 17 54 19 35 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 1.8
+2 -3
View File
@@ -9,9 +9,8 @@ trailer no
# 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.
# 3 steering, 5 gravity, 7 and 8 half the car's length and width
# (for collisions; the tow hitch is at the back). 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 57 28 32 12 3 29 20 14 51 15 63 0 0 0 0 0
# weight when cars collide (not from the original data)
mass 1