Commit Graph

668 Commits

Author SHA1 Message Date
Dustin Carlino
a5b62cd454 Simplify CreateCar, using the PathRequest embedded in the router's Path 2020-12-16 13:23:33 -08:00
Dustin Carlino
fccc98205c Refactor: Store the input PathRequest inside the resulting Path. This
saves lots of callers from cloning the request and separately plumbing
around the requested start/end distance. Also a step towards exposing
more granular distance crossed in a path for #392.

Still a few more places to simplify, but will do in a separate, smaller
change.
2020-12-16 12:55:57 -08:00
Dustin Carlino
54eee6d3e4 Clarify instructions on the level prep screen and mark the start. 2020-12-15 12:45:08 -08:00
Dustin Carlino
5aecff3b9e Regularly import Salzburg. #366 2020-12-15 06:02:06 -08:00
Dustin Carlino
7ffa7f73f8 - Tune sprite size
- Fix duplicate unlocked vehicles
- Tune the zoom in-game
- Distinguish goal for each level, vs max possible score
- New time left panel
2020-12-13 12:44:43 -08:00
Dustin Carlino
6c3bd13874 Get that title screen closer to Figma. 2020-12-11 14:15:28 -08:00
Dustin Carlino
607a8757dd Use widgetry to handle quitting things, so we don't just blow up on the
web.
2020-12-11 13:18:20 -08:00
Dustin Carlino
aa5010f2d0 Import part of Manhattan. Need to adjust the boundary to fix water
polygons, but this is a start.
2020-12-09 16:15:08 -08:00
Dustin Carlino
6e6e975923
There's no way it's this easy to add music... (#417) 2020-12-09 13:46:27 -08:00
Dustin Carlino
c8a37a27a0 Create 3 new small maps of Seattle for the experiment. Notably, 2 of
them simulate fully with --infinite_parking, and SLU makes it to about
4pm, so these might have some other interesting use...
2020-12-07 20:58:04 -08:00
Dustin Carlino
a88fef0874 Update minimap style and other bits from Figma, better snowflakes 2020-12-07 16:42:41 -08:00
Dustin Carlino
af9f9080a2 Some experiments to chop Seattle into some smaller pieces. Not used yet. 2020-12-06 21:25:22 -08:00
Dustin Carlino
139f442ba7 Flatten transforms in the Santa SVGs from Illustrator. The pitiful SVG
processing code in widgetry doesn't handle paths nested under groups
with transforms. To workaround, preprocess the SVGs:

1) Open in Inkscape
2) Click the problematic group
3) Menu "Path > Object to path"
4) Menu "Extensions > Modify path > Apply transform"

And scale down the two bike sprites
2020-12-05 17:57:46 -08:00
Dustin Carlino
8531c8c773 Pick different vehicles, animate the player a bit 2020-12-03 14:23:30 -08:00
Dustin Carlino
2aaa7e4dee Split into multiple panels, add a pause screen, fix switching maps 2020-12-03 12:38:28 -08:00
Dustin Carlino
60117a64e8 Handle starting/ending in a zone when pathfinding, regardless of Dijkstra/CH implementation. #411
The import bug in Münster is still happening though! Still digging in.
(But regardless, this change fixes some old technical debt)
2020-12-02 10:42:01 -08:00
Dustin Carlino
01737ea0c5 Update prebaked data after #412 2020-12-01 19:22:32 -08:00
Dustin Carlino
675427f940 Track the direction the player is facing when moving around. And...
hello, Santa.
2020-12-01 13:06:27 -08:00
Dustin Carlino
57963126fa Fold number of housing units into Building; ditch the extra file approach. 2020-12-01 12:43:19 -08:00
Dustin Carlino
aa4d848a0e Figure out the number of single family and multi-family units per OSM building, from parcel data. Just store it in an extra system file for now. 2020-11-30 10:58:47 -08:00
Dustin Carlino
72e54c68d8 Fix a bug with TripManager's spawn_ped -- it wasn't actually cancelling trips when pedestrians don't have a path for the second leg of their trip. #258 2020-11-25 10:34:53 -08:00
Dustin Carlino
ff829db8f1 Expanding the boundary of huge_seattle, and creating a new north_seattle map 2020-11-25 08:56:55 -08:00
Dustin Carlino
47d09d61f0 Plumb the intended TripMode for cancelled trips; instead make the trip duration optional. Breaking change for anyone using the API. Makes way more sense. [rebuild] [release] 2020-11-22 11:21:44 -08:00
Dustin Carlino
fb07e35200 Just download a KML file of Seattle zoning codes, for #393 2020-11-21 08:55:58 -08:00
Dustin Carlino
308eb90956 Bring in Seattle parcel data to experiment with filling the negative
space on maps with "private area around houses".

And a few tweaks to the KML viewer to make it more useful:

- optionally save the clipped file
- click an object to view all attributes in a scrollable popup
2020-11-20 10:30:13 -08:00
Dustin Carlino
f6565988c9 Let parking aisles span multiple parking lots. 2020-11-19 12:34:31 -08:00
Dustin Carlino
915e12ff7e Remove PersonID from Scenario; the simulation will assign IDs sequentially. They're redundant. #258
Slightly reduces scenario file size, and simpler code to construct
scenarios.
2020-11-18 14:13:25 -08:00
Dustin Carlino
4ab98b1477 Compact the schedule in Scenario by just storing each TripEndpoint. #258
The schedule validation changes slightly. No-op trips between the same
origin/destination are now an error and get filtered out.

huge_seattle scenario goes from 129MB to 110MB with the redundant
endpoints removed.
2020-11-18 11:13:09 -08:00
Dustin Carlino
82c7cd1e8f At last, collapse the OD -> SpawnTrip -> TripSpec function into one thing. #258 2020-11-17 17:55:29 -08:00
Dustin Carlino
7741ea79b5 Refactor starting trips -- caller passes in TripInfo. Stop inferring
TripEndpoints from TripLegs. #258

NOW regenerate scenarios. I'm confident this sweeping refactor didn't
break behavior, because prebaked data didn't budge. huge_seattle
scenario went from 147MB to 129MB. Not bad!
2020-11-17 16:59:37 -08:00
Dustin Carlino
8d28274736 Simplify the old ScenarioGenerator, mostly by removing OriginDestination
in favor of Option<TripEndpoint>. The bike/car contention tutorial stage
has to be tweaked manually, since there's no longer a nice way to spawn
vehicles at a non-border intersection and force them to use a certain
DirectedRoad. #258
2020-11-17 15:51:30 -08:00
Dustin Carlino
5ea3c2ba6f Remove support for remote trips, and stop plumbing off-map locations. A
remote trip goes between two locations off-map, specified just by a GPS
coordinate. The trips aren't simulated at all. They were originally
added to support Orestis's pandemic model, to handle transmission
off-map in shared buildings. This work has died off, there are no other
anticipated use cases for remote trips, and they complicate bigger
refactorings. #258

This also has the nice side effect of substantially reducing scenario
size -- huge_seattle from 177MB to 147MB. That unused metadata was
expensive!
2020-11-17 10:14:23 -08:00
Dustin Carlino
396b9b1969 Infer parking tags better for dual_carriageway=yes. Also stop inferring parking on trunk roads like Aurora. And pull in fresh Seattle OSM, with lots of dual_carriageways tagged. #230 2020-11-14 17:32:34 -08:00
Dustin Carlino
8101c2a820 Add a favicon to the web deployment, mostly to stop an error in the devconsole 2020-11-14 10:51:33 -08:00
Dustin Carlino
b6be9c81d5 Generate city picker maps from a bunch of small maps, instead of one huge map. Use for Paris. One giant map covering everything there is going to be too large. 2020-11-13 18:22:46 -08:00
Dustin Carlino
d43bf2c869 Import Paris, for helping the OSM community visualize all the awesome pop-up bike lanes there 2020-11-13 17:23:36 -08:00
Dustin Carlino
c6b752d41b Iterate on automatically finding medians for #230. Still not ready, but
get fresh OSM data to test in both Krakow and Seattle. While I'm at it,
also grab fresh OSM for Krakow, since it's been ages.
2020-11-12 17:58:19 -08:00
Dustin Carlino
69699600ea Prototype filling in the gaps near one-way roads. Needs more filtering
out, but solid start. #230

Regenerate map data, since the Area object changed.
2020-11-12 14:21:08 -08:00
Dustin Carlino
22cef74aec Always allow blocking a degenerate intersection. Visually inspected on
the lane-changing test map. #382

Also abandon sim.run_until_done; the only caller was the LC test, and it
uses 30s steps inappropriately anyway.
2020-11-12 11:34:17 -08:00
Dustin Carlino
4b557fa6de Bring in fresh OSM for Seattle. Because it's so annoying to manually
repair proposals when roads change upstream, make the test dump a
repaired file before failing. Manually inspect/amend that.
2020-11-11 15:16:06 -08:00
Dustin Carlino
104c987edd Import Seattle collision data and convert to the common format. #87 2020-11-06 13:16:50 -08:00
Dustin Carlino
e0a8d82b61 Reorganize polygon files to importer/config, instead of data/input.
Nothing in data/input should be under version control; all of it is
managed by the updater. #326
2020-11-06 10:10:03 -08:00
Dustin Carlino
ad7a25f7f2 Prototype a simple data format for collision data. Import data for Leeds and London. #87 2020-11-05 16:16:40 -08:00
Dustin Carlino
ac6eff31ef Rename some maps to remove the now-redundant city. #326 2020-11-05 15:24:02 -08:00
Dustin Carlino
e15efa9002 Organize raw maps by city. With this, data/input/ is totally namespaced by city! Nothing prevents us from having a map named "downtown" in multiple cities now. #326 2020-11-05 14:58:28 -08:00
Dustin Carlino
3d84defb71 Also organize screenshots by city. #326 2020-11-05 14:42:40 -08:00
Dustin Carlino
4f2cda8d53 Reorganize data/system/ files by city! The only interesting change is
abstutil::path_all_maps becoming abstutil::list_all_maps. #326
2020-11-05 14:05:48 -08:00
Dustin Carlino
576e64e246 Consolidate integration tests from the map_tests crate and some of the
stuff smushed into game for some reason
2020-11-05 12:42:52 -08:00
Dustin Carlino
89a4e5bdcd Disable output from the snapped cycleways experiment. The output is
nondeterministic (for still unknown reasons) and the spurious diff when
the importer is run is a distraction.
2020-11-05 11:43:50 -08:00
Dustin Carlino
67530bec07 Future-proof file organization by changing map_name from a string to a
struct. Whatever choices we make next about naming cities hierarchially
or not can be managed in just one place. #326

This is a pretty huge change, but the compiler gives reasonable
confidence it's correct. More bugs are likely to crop up in the next
step, when filenames start being namespaced by the city too.
2020-11-04 17:26:32 -08:00
Dustin Carlino
d0b26f56b4 Track file size of data files in the manifest too, to more easily notice when they change 2020-11-04 14:35:20 -08:00
Dustin Carlino
e99dd5bba7 Use inferred sidewalks for Leeds, after detecting another geometry bug
when building sidewalk corners. Raw sidewalks from OSM aren't suitable
for traffic simulation yet.
2020-11-04 08:46:06 -08:00
Dustin Carlino
21cd7a197d Run the experimental cycleway snapper phase for Leeds, after adding a
check to skip ways like https://www.openstreetmap.org/way/429285996,
which're unexpectedly loops.
2020-11-03 15:57:21 -08:00
Dustin Carlino
77979706c6 Upload the Leeds data to S3, for #375 2020-11-03 10:56:54 -08:00
Robin
edf5d0d8a9
Add Leeds (#375) 2020-11-03 10:53:14 -08:00
Dustin Carlino
c481567ebb Cut over from Dropbox to S3. #195, #326
Uploading files individually to Dropbox is flaky, and the unique URL per
file complicates data/MANIFEST.

While we're at it, start carving aside a directory structure for keeping
data for the last few releases.

[rebuild] to make sure github actions can download everything
2020-11-02 17:36:02 -08:00
Dustin Carlino
b2519e3050 Add an extra check for polyline intersection endpoints. I found an
intersection polygon in Krakow that has really bad geometry, and this
improves it. The extra check absolutely shouldn't be necessary, but of
course, all the core line intersection code is quite suspect! #161
2020-11-02 15:10:45 -08:00
Dustin Carlino
6e417340e4 Generate turns much more simply for intersections of footpaths. #161
Also gets rid of some annoying warnings about roads with missing names.
I could continue to skip the warning for more situations, but I think
this sort of data quality check could be done better in the OSM viewer.
2020-11-01 18:20:32 -08:00
Dustin Carlino
8920c2c0b8 Store gzipped files in S3 and decompress upon loading. A few basic tests
showed this is faster than downloading the uncompressed files, but of
course it probably depends on network speed vs CPU. #326

Also cut over the updater to use gzipped files using flate, instead of
single-file .zip's. [rebuild]
2020-10-31 18:09:48 -07:00
Dustin Carlino
b46c3d26eb Don't infer sidewalks for the plethora of demo maps 2020-10-31 17:06:48 -07:00
Dustin Carlino
4624baad0b Woops, binary format of MapConfig changed, so regenerate all maps 2020-10-31 10:08:05 -07:00
Dustin Carlino
04b9eef24a When using OSM footpaths, don't stick sidewalks on the road when sidewalks=separate and also bring in cycleways and paths allowing foot traffic. #161 2020-10-30 15:16:19 -07:00
Dustin Carlino
ca2ff08d71 Don't render intersections between footways with a special color. Also
cut Kraków over to using the new experimental footpath support. #161
2020-10-30 14:11:00 -07:00
Dustin Carlino
3ed7e73aa8 Use a u64 RNG seed, not a u8 2020-10-29 09:25:07 -07:00
Dustin Carlino
0ddfb201d9 Get some parts of Tokyo to import, by adjusting the filter for city-like
boundaries and by preferring English filenames. #326
2020-10-27 14:10:42 -07:00
Dustin Carlino
b4c39a0850 An initial script to mass import cities. #326 2020-10-26 17:46:53 -07:00
Dustin Carlino
47fa997f72 Refactor a proper Amenity struct. Leave room for optional raw OSM tags.
Don't expose the tags in the UI yet. [rebuild]
2020-10-25 11:49:46 -07:00
Dustin Carlino
34b41a909e Optionally keep building OSM tags. Display in info panels and the new viewer, when present.
Don't keep the tags by default. File size increase from the empty map is
negligible.
2020-10-24 14:19:22 -07:00
Dustin Carlino
8b0d6c6e92 Fix thought bubble svg; for some reason, it had cyan in one of the bubbles instead of white 2020-10-22 21:06:55 -07:00
Dustin Carlino
ad41303e5c After making live map edits, indicate that results aren't finalized. #312 2020-10-22 11:05:07 -07:00
Dustin Carlino
e38858129b Cleanups after https://github.com/dabreegster/abstreet/pull/363:
- cargo +nightly fmt
- upload new prebaked data
2020-10-10 12:24:42 -07:00
Dustin Carlino
2cd59ead37 Remove the special handling for synthetic maps, which were JSON RawMaps
that could directly be loaded. The few examples have been long broken
and unused. They complicate map loading, because they have a weird path.
2020-10-09 16:08:11 -07:00
Dustin Carlino
fd004a59bf Fix a few broken dropbox links caused by doing the cutover in the previous commit 2020-10-08 13:57:49 -07:00
Dustin Carlino
d09ead3672 Use serde for data/MANIFEST 2020-10-08 13:14:40 -07:00
Dustin Carlino
536429f37f Fix lakeslice again. Some manually fixed traffic signals weren't
imported, because they referenced way IDs from before the service road
import. That happened after a bad Cargo.lock merge undid the effects of
pinning to the latest seattle_traffic_signals.
2020-10-07 15:06:03 -07:00
Michael Kirk
2ed916e89f
show parking intent (#362) 2020-10-07 14:16:58 -07:00
Dustin Carlino
d844646cb9 Implement per-road caps for #325, necessitating a tiny map edits version
bump.
2020-10-06 14:17:55 -07:00
Dustin Carlino
fa45590041 Tag E 24th as narrow and assign it narrower width. This still doesn't
quite fix the wacky geometry at Madison/24th, but it gets closer.

Also redo two outdated traffic signals, speeding up lakeslice more.
2020-10-03 18:17:35 -07:00
Dustin Carlino
ffdedcb0a7 When multiple source lanes can turn left* to multiple destination lanes,
only allow the leftmost source lane to turn to any destination lane. As
a future improvment, need to handle multiple explicitly tagged left turn
lanes, but this gets closer to reality, particularly helping some crazy
maneuvers along Mercer in downtown.

*or right

Also had to update lanes along Madison and fiddle a bit to keep
lakeslice running. Spotted some major traffic signal bottlenecks due to
stage generation falling back, will iterate on that separately.
2020-10-03 09:40:15 -07:00
Dustin Carlino
ac5aa927db Test turn generation via goldenfiles instead. Revert the "import from a
raw string" stuff from the previous commit.

Add tests of a few interesting intersections. The results right now
aren't ideal, but this sets things up for fast iteraton.
2020-10-01 15:34:43 -07:00
Dustin Carlino
2b87736dd4 Pull in fresh OSM, with fixed turn lanes near the notorious Madison / Lake Wash Blvd. NOW it runs without gridlock again! 2020-09-30 10:30:01 -07:00
Dustin Carlino
e8d6525c59 Trim out unrealistic left and right turns. Find cases where multiple
lanes all lead to a single lane via left/right turn, and just keep the
left/rightmost lane.

Sanity checked at Rainier / S Massachusetts, and 23rd / S Massachusetts.
2020-09-30 10:30:01 -07:00
Dustin Carlino
5813603594 Include multipolygon parking lots from OSM 2020-09-28 11:39:34 -07:00
Dustin Carlino
4ceb190f6c Add a polygon for Redmond/Kirkland 2020-09-27 12:49:21 -07:00
Dustin Carlino
371d26f707
Bring in alleyways from OSM! [rebuild] (#351) 2020-09-27 12:20:27 -07:00
Dustin Carlino
84891f8b96 Some map fixes to prepare for alleyways:
- Temporarily workaround snap_cycleways crash in Xi'an
- Fix interpretation of blank turn restrictions. https://www.openstreetmap.org/way/739621435 was missing a right turn, which was causing vehicles to do this crazy loop to go from Madison EB to Lake Wash SB.
- Ignore turn restrictions when they don't match the number of lanes. https://www.openstreetmap.org/way/428090702 and similar need some updating.

Regenerate all data, but give up on lakeslice running fully. Going to
sacrifice that one for a bit to get new roads imported.
2020-09-27 11:21:35 -07:00
Michael Kirk
00fb0ef8cd Cleanup dropdown - stop using unicode "down arrow"
We were drawing "pop-up" style buttons in several places, using
copy/pasted logic - which was simple enough when using a unicode glyph.

But we want to use a different glyph which isn't in our font. Further,
using an svg like this gives us finer grained control around the layout
around the button "handle" than we could get with just space characters.
2020-09-24 19:12:39 -07:00
Michael Kirk
8ad32c5cee separate widgetry assets
might be helpful for packing separate widgetry crate
2020-09-24 19:12:39 -07:00
Dustin Carlino
938dab8e94 Determine border intersections exclusively from roads that cross the
clipping boundary. I don't remember why the more complicated thing came
about. This fixes a weird incoming border in SLU into an unreachable
intersection (which is more accurate) and doesn't seem to cause any
problems to normal or oneshot maps, with or without explicit clips.
2020-09-22 16:06:39 -07:00
Dustin Carlino
eecd933c2f upload new data for #340 2020-09-22 12:00:16 -07:00
Dustin Carlino
3eb51d75a5 Sketch a polygon for bellevue 2020-09-19 13:52:09 -07:00
Dustin Carlino
4a07164394 Add the concept of trip purpose. Seed it from Soundcast data, or assign
it for the prolet robot model. Expose it in the trip info panel.

Total scenario size from 385MB to 412MB, but that's not so bad, and this
seems worth it.
2020-09-19 13:02:36 -07:00
Dustin Carlino
15af3846b1 Round driving costs for pathfinding more carefully. When we create
uber-turns (sequences of turns through a few intersections) due to OSM
turn restrictions, we have to be a little careful how we sum up the cost
for the entire sequence, only rounding at the end.
2020-09-18 15:39:35 -07:00
Michael Kirk
c0e2a611a0
introduce textures to rendering pipeline (#333) 2020-09-17 18:38:55 -07:00
Dustin Carlino
9f8dfdd699 Fresh OSM again, to pull in better data for cycleways 2020-09-16 17:38:45 -07:00
Dustin Carlino
10a074f84f Update map data for #332 2020-09-16 16:43:44 -07:00
Dustin Carlino
6e10f40801 Overhaul lane editor UI. #331 2020-09-16 12:32:11 -07:00
Dustin Carlino
da287ae68f Discard changes from traffic signal editor. #331 2020-09-16 11:50:57 -07:00
Dustin Carlino
3dcdb9ec02 Update OSM data (and fix the stage icon) 2020-09-16 10:29:51 -07:00
Dustin Carlino
7bd1d937f9 Some of Yuwen's cosmetic traffic signal editor changes 2020-09-15 09:32:46 -07:00