Skip to content

The Go To path as the original draws it - #108

Open
MortenLyhr wants to merge 2 commits into
bssth:masterfrom
MortenLyhr:fix/goto-path-look
Open

MortenLyhr wants to merge 2 commits into
bssth:masterfrom
MortenLyhr:fix/goto-path-look

Conversation

@MortenLyhr

@MortenLyhr MortenLyhr commented Nov 20, 2026 •

Copy link
Copy Markdown
Contributor

With a unit selected and the right button held over a plot (or in Go To, or Route To), OpenCiv4 drew a line with small numbered discs. The original draws something else; this draws it the same way, from the original's own art:

  • Dots: white dots (Art/Units/Selection Effect/CircleDot.dds) laid on the ground every 0.2 plot from the units to the target. They slide along the way at 0.1 plot a second.
  • A ring at each turn's end: GroundSelectionWaypoint.dds lies flat on the ground, 0.66 plot wide, and turns clockwise at 45° a second. The number of turns stands upright over it in the game's number font (res/Fonts/NumberFont-Sylfaen64px.tga), 0.185 plot tall.
  • An arrow: GroundSelectionWaypointArrow.dds, 0.13 plot, 0.4 plot out from the ring's centre. It points along the way on from that ring; the last ring's points along the way in.
  • Colours (the art times COLOR_RED / COLOR_GREEN):
    • an attack: the last ring and its arrow are red;
    • no way there (a peak, a ship onto land): a red ring alone, with its arrow to the north, and no number or dots;
    • Route To (Alt+R): one green ring, at the end, with no number. The way is found again when the interface mode changes, so Alt+R with the mouse still turns it green.

A stack, a ship and the Go To mode (G) look the same as one unit with the right button held.

Measured in Wine (BUG + BULL, 1600x900):

  • sizes from plot spacing in close and far pictures;
  • the dots' step and speed and the ring's spin from a 120 fps film of the window.

Wine | before | after (each picture: the original, OpenCiv4 master, this PR):

Two turns, close:
two turns
Attack (the last ring red):
attack
No way there (a peak):
peak
Around the peak, six turns:
around
Route To (Alt+R):
route to
A stack:
stack
A galley onto land:
galley onto land

Not done here:

Merging with #97 (Route To): main.cpp conflicts on the if that finds the way. Keep #97's lines and add || pathMode != pathFoundIn to its condition.

Checks

  • ctest 15/15 (rebased on master 8b7d8557).
  • Sync checksums (--turns 100 --map Fractal --size STANDARD --seed 7) equal to master's on all 100 turns (D7D43800): interface only.
  • CvPlot::isVisibleEnemyUnit(PlayerTypes) (the attack test) is DllExport, so the Windows build links.

🤖 Generated with Claude Code

MortenLyhr and others added 2 commits November 23, 2026 09:14
White dots on the ground every 0.2 plot, sliding the way the units go; at
each turn's end the original's waypoint ring laid on the ground, turning,
with the turns in its number font and an arrow along the way. The last ring
red for an attack, a red ring alone where they cannot go, green rings
without numbers for Route To. Measured in Wine (backlog bssth#47).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…de changes

Wine shows a worker's road with one green ring, at its end. The way is now
found again when the interface mode changes (Alt+R with the mouse still).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant