Rework the movement preview for touch #23
Labels
No labels
area/ai
area/build
area/character
area/combat
area/data
area/docs
area/game
area/net
area/ui
area/world
size
l
size
m
size
s
type
bug
type
design
type
feature
type
refactor
type
test
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
icub3d/terra-redux-org#23
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implements ADR 0003.
MovementPreviewholds "the route to whatever the cursor is over", fed byHoveredTile,and the overlay draws a line from the selected unit to the cursor ending in an arrowhead.
A touchscreen has no cursor, so the tile is never hovered and the line is never drawn.
The flood fill and the reachable diamonds survive; the half of the overlay that answers
where am I going does not.
Rework it as a two-stage commit: tap a unit to select, tap a tile to choose a
destination, confirm to act. The chosen tile stays chosen until the player picks another
or cancels — a preview that exists only while a finger is down is one the player cannot
read, because their hand is on top of it.
Do this before #6 and #8 build on the current shape, which is the entire reason ADR 0003
was written now rather than later.
Constraints
an equal-cost rival to the one the overlay was built from, and a unit that walks a
different way than the line promised is a bug the player sees and cannot explain.
but nothing it shows may be unavailable without it.
cancel affordance, not just Escape.
Done when
A unit can be selected, a destination chosen, and the choice cancelled, using only taps;
the desktop mouse path still works; and the route drawn is the route the flood fill
found.