Which fallback mechanism to pursue for overtaking? #7

Closed
opened 2026-10-04 19:59:13 +00:00 by haylan · 1 comment
Owner

Part of #1

Question

The feasibility research found no documented script command to set a land vehicle's lane, path position or speed; only indirect approximations exist (per-vehicle topSpeedScale, static lane layout via street/lane config, a custom-entity fake-car hack). Which fallback do we pursue, what in-game probes would settle it, and does the destination need redrawing? Read docs/research/overtake-feasibility.md on branch research/overtake-feasibility first.

Part of #1 ## Question The feasibility research found no documented script command to set a land vehicle's lane, path position or speed; only indirect approximations exist (per-vehicle topSpeedScale, static lane layout via street/lane config, a custom-entity fake-car hack). Which fallback do we pursue, what in-game probes would settle it, and does the destination need redrawing? Read docs/research/overtake-feasibility.md on branch research/overtake-feasibility first.
haylan added the wayfinder:grilling label 2026-10-04 19:59:13 +00:00
haylan self-assigned this 2026-10-04 20:10:09 +00:00
Author
Owner

Resolution

Mechanism: a visual illusion, not a real lane change. The API can't move a car laterally (see the feasibility research), so for now the passer drives through the blocker.

  • Same-direction multilane roads: every car already uses the same lane, so the passer just goes past the blocker with no further checks.
  • Two-way roads (one lane per direction): the pathfinding/script must first check for oncoming traffic and refuse to overtake if it would be risky.
  • Scope: player-owned vehicles only. Cars only; trains are a later effort.
  • Success bar: the faster vehicle is not stuck behind the slower one; looking like a real pass is a stretch goal.
  • Probe first: before building anything, probe in game (needs the hello-world mod) whether LandVehicleMoveInfo/MovePath expose useful data and whether the engine already lets cars pass on multilane roads or bus lanes. Also needed: whether vehicle-vs-vehicle blocking can be bypassed at all.
  • Extra avenue if the probes find nothing: custom road/lane definitions (static lane layout). If that fails too, the map ends with a negative verdict.
  • Ruled out of scope: the fake-car hack (despawn a real car and animate a custom entity past the blocker); non-player vehicles.
  • Vocabulary: see CONTEXT.md (overtaking, blocker, passer, player-owned vehicle). Priority is deliberately left undefined; it belongs to the behaviour spec.
## Resolution **Mechanism: a visual illusion, not a real lane change.** The API can't move a car laterally (see the feasibility research), so for now the passer drives *through* the blocker. - **Same-direction multilane roads:** every car already uses the same lane, so the passer just goes past the blocker with no further checks. - **Two-way roads (one lane per direction):** the pathfinding/script must first check for oncoming traffic and refuse to overtake if it would be risky. - **Scope:** player-owned vehicles only. Cars only; trains are a later effort. - **Success bar:** the faster vehicle is not stuck behind the slower one; looking like a real pass is a stretch goal. - **Probe first:** before building anything, probe in game (needs the hello-world mod) whether `LandVehicleMoveInfo`/`MovePath` expose useful data and whether the engine already lets cars pass on multilane roads or bus lanes. Also needed: whether vehicle-vs-vehicle blocking can be bypassed at all. - **Extra avenue if the probes find nothing:** custom road/lane definitions (static lane layout). If that fails too, the map ends with a negative verdict. - **Ruled out of scope:** the fake-car hack (despawn a real car and animate a custom entity past the blocker); non-player vehicles. - **Vocabulary:** see `CONTEXT.md` (*overtaking*, *blocker*, *passer*, *player-owned vehicle*). *Priority* is deliberately left undefined; it belongs to the behaviour spec.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: haylan/tpf3-overtake#7