Description
Optimize agent artist rendering to avoid incorrect assumptions about agent movement paths, Extension of #78 .
Proposed Changes
The agent renderer assumes that when an agent moved from node u to node v, it always traversed the edge linestring connecting them. However, agents can teleport between nodes due to specific game rules, making this assumption invalid.
Changes to implement neighbor-aware edge detection and zoom-based rendering strategy:
- Neighbor Check: Verify that target node
v is a neighbor of previous node u before attempting to use the edge's linestring for interpolation.
- Fallback: If no valid edge exists (or nodes aren't neighbors), fall back to straight-line interpolation between node positions.
- Zoom-Based Optimization: Reusing pixel-threshold heuristics from graph rendering to decide whether to:
- Use full linestring interpolation (zoomed in)
- Use cheap straight-line interpolation (zoomed out or sub-pixel movement)
Related
Description
Optimize agent artist rendering to avoid incorrect assumptions about agent movement paths, Extension of #78 .
Proposed Changes
The agent renderer assumes that when an agent moved from node
uto nodev, it always traversed the edge linestring connecting them. However, agents can teleport between nodes due to specific game rules, making this assumption invalid.Changes to implement neighbor-aware edge detection and zoom-based rendering strategy:
vis a neighbor of previous nodeubefore attempting to use the edge's linestring for interpolation.Related