watching https://www.openstreetmap.org/node/53214134 on the weekday
scenario. At some point, an arrow polygon with an inner ring is scaled
down, collapsing its points so much that the ring becomes invalid.
when allowing a car to start a turn. It causes
https://github.com/dabreegster/abstreet/pull/276#discussion_r470269394
and also the lakeslice scenario to gridlock (a regression that began a
few weeks ago). But keep the flag on for now, to keep the montlake
scenaro running at least.
https://dabreegster.github.io/abstreet/trafficsim/gridlock.html has
notes about the many different causes and in-progress fixes for
gridlock. This experiment hasn't been explained very well yet, but
roughly it treats a cluster of traffic signals as one, so that once a
vehicle gains access through the first light, they guarantee immediate
access through the entire sequence. This interacts with the "don't block
the box" behavior (don't start a turn if you might get stuck in the
intersection) strangely.
While attempting to get this rollback to work, I also had to manually
redraw the traffic lights for a few manually specified intersections.
They became out-of-date a few weeks ago when I cleaned up the OSM
geometry upstream and the referenced IDs changed, and I hadn't bothered
to re-time the signals. Luckily, with the new multi-signal editor,
redrawing the timing was much easier than originally!
Regenerated all data and lots of bus routes vanished. Plan to get back
to that project soon.
OriginalBuilding was to refer to buildings in a stable way across
different maps and across OSM updates. Recently, OsmID and friends
appeared. The double layer of wrapping is an annoying API.
Not regenerating map data yet; about to do the same thing for
OriginalIntersection
when the window is resized. This is a bit unexpected if done
interactively in-game, but not unreasonable.
This mostly fixes the issue that sometimes happens starting with --dev.
When the resize happens late on X11, the minimap looks initially better,
but still cut off horizontally. Zooming in and out fixes it. (Before,
even zooming in/out would keep it tiny, because base_zoom was never
reset.)
These are my best guess at the changes to get glow working with the DPI changes.
Currently on master, on macos at least, building the glow backend
launches a blank screen. That's not resolved by this PR, so all these
changes are untested.
Previously it was not clear (to me at least) when a value used
in layout was in units of logical pixels vs physical pixels.
This lead to some ambiguity about where to scale values, and lead to
some values being scaled more than once or sometimes not at all, leading
to inconsistent layouts across DPI's.
The intent of this change is to solve this ambiguity by having the ui
clients work *exlusively* with logical pixels.
To achieve this, we consolidate all scaling to the graphics backend.
We translate all PhysicalPositions from the windowing libraries to
LogicalPixles.
Our own types: ScreenPt, ScreenDim, etc. are all in logical units.
In some places, I replaced passing raw floats with a corresponding
Screen* type to clarify that the units are in logical pixels.
recording errors and falling back to circular geometry and not trimming
roads
also filter out highway areas like
https://www.openstreetmap.org/way/132705692, woops!
Manchester and NOLA now import...
now, just switched everything to must_* variants, but this paves the way
for handling failures.
... except for rendering pedestrian crowds -- I _think_ I saw a crash
from that, and it's easy to have a fallback there