Commit Graph

199 Commits

Author SHA1 Message Date
Dustin Carlino
4235d9f994 When importing maps, optionally add in extra buildings from a GeoJSON
source to augment the ones in OSM. For
https://github.com/cyipt/actdev/issues/53 -- sometimes the buildings
just haven't been mapped in OSM yet, other times the buildings are part
of a future development site. In either case, we can procedurally
generate some houses, so this is a way to include them in the map.

Start doing this for Chapelford. But first, adjust the generated house
sizes -- they were WAY too tiny.

Also prep for [rebuild] [release]
2021-02-07 13:56:26 -08:00
Dustin Carlino
fd423439b8 Upgrade tokio, hyper, and lru 2021-02-03 18:33:06 -08:00
Dustin Carlino
73e405e382 Upgrade most dependencies 2021-02-03 18:13:06 -08:00
Dustin Carlino
c9c6f240ae Remove timer.{note, warn, error} in favor of the log crate. #262
Originally, the intention of the deleted calls was to not interrupt
Timer progress bars with warnings. But the output of things like the
importer is impossible to read anyway. Strongly considering explicitly
sending logs and timing info to separate places and using something like
multitail for live progress.

Unplumb timer from LOADS of places that just needed it for logging.
2021-01-21 19:22:02 -08:00
Dustin Carlino
e4bf32a145 Handle deleting cars live from the middle of uber-turns. #312 2021-01-19 15:43:01 -08:00
Dustin Carlino
0be06d04f9 Switch to maintained version of earcutr.
Since we have to regenerate everything anyway, also start importing
landuse=meadow areas for #449.
2021-01-14 08:29:49 -08:00
Dustin Carlino
d49c6c5d7d Refactor the logic of distributing N people to K buildings. This was
duplicated between the Berlin importer and the new census-based popdat
crate, and I suspect some form of it might get used for the actdev
integration. #424
2021-01-13 11:18:51 -08:00
Dustin Carlino
dff6d6004d On the web, use URL query parameters as the command-line arguments. This
is a step towards initializing with any map. #344

As a demo, running locally, http://0.0.0.0:8000/?--dev&--color_scheme=night%20mode now works
2021-01-09 13:02:39 -08:00
Dustin Carlino
2972fef609 Trim wasm size for #377
- Remove one of Holly's characters, since it's still unused
- Exclude assets/music

game from 54MB down to 31MB
2021-01-08 17:41:53 -08:00
Dustin Carlino
7f0cdace5a Use OpenGL to take screenshots instead of scrot. Benefits:
- Simple -- one OpenGL call and feeding to the awesome image crate
- Faster -- seemingly don't need the sleep() for whatever vsync problems
- Portable -- doesn't use the Linux scrot tool
- I can switch windows and wiggle the cursor with impunity while this runs

One disadvantage: screencaps in S3 are now slightly larger PNGs, because
for some reason, the image/gif feature is super slow, even in release
mode.

For now, this makes the process of screenshot diffing map changes
easier. But it also might help with producing raster tiles for Leaflet. #440

Also, had to regenerate lakeslice because of the previous change --
it had an old adaptive signal baked in.
2021-01-05 14:58:31 -08:00
Dustin Carlino
6f5f001406 Address SUMO PR comments and also rebase. Mainly:
- use an enum for vehicle types
- distinguish lane and internal lane IDs
2021-01-05 12:44:38 -08:00
Dustin Carlino
802e020520 Import a SUMO network, transform it into an ABST map. So far, this gets
lanes and intersections displaying, but with lots of problems.
2021-01-05 12:44:38 -08:00
Dustin Carlino
e99def9124 Switch all error handling to anyhow. Nothing consumes our code as a
library yet, so this is a step forward from string errors. Manually
tested how errors show up (including the nice with_context bit).
2021-01-05 11:35:03 -08:00
Dustin Carlino
cd7dca87d7 Fix web build after rand upgrade. Unfortunately I think this has to happen in all of the binary crates individually: https://docs.rs/getrandom/0.2.1/getrandom/#indirect-dependencies 2021-01-05 11:12:03 -08:00
Dustin Carlino
dedb041bdb Move CameraState to map_gui. Now widgetry has no dependency on abstio! #253 2021-01-04 10:39:15 -08:00
Dustin Carlino
bfa208ce6a Parameterize widgetry on a way to read SVG files. This is one of the last steps to remove the dependency on abstio. #253 2021-01-04 09:53:24 -08:00
Dustin Carlino
d529ae2e5c Upgrade usvg and rand 2021-01-04 09:19:54 -08:00
Dustin Carlino
965d999199 Upgrade misc other dependencies 2021-01-03 20:01:27 -08:00
Dustin Carlino
2945913fb3 Upgrade rand 2021-01-03 19:48:03 -08:00
Dustin Carlino
5c04923dff Split abstio crate out from abstutil. #253
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
2021-01-02 10:28:00 -08:00
Dustin Carlino
302ec94e3d Try exporting the zoomed-in rendering of a map to geojson. #440
This approach has some manual effort and it's not capturing everything
yet, but it's a start.
2021-01-01 12:46:25 -08:00
Michael Kirk
acadad8bdf
fetch US census data from a hosted FlatGeoBuf (#432) 2020-12-31 16:20:32 -08:00
Dustin Carlino
312a721e63 Fold the separate seattle_traffic_signals git repo back into this one.
Originally it was split out to organize a separate volunteer mapping
effort, but that never took off, and it's unlikely to happen. When we
have to occasionally update the prebaked signal data for some
intersections, it's unnecessary friction to update the other repo.
2020-12-31 11:01:48 -08:00
Dustin Carlino
df59b477a5 Start importing Bellevue. Treat it as a separate city from Seattle, and
don't even check if Soundcast data covers it yet.

Now regenerate all map data.
2020-12-30 13:21:59 -08:00
Dustin Carlino
64ef2f025a Restore the ability to merge short roads at the RawMap layer and in the
map_editor. It was nuked in 182f5139a5,
when I decided the MapFixes approach wasn't worth it. #114

The restored version doesn't attempt to handle turn restrictions again
yet.
2020-12-28 17:21:20 -08:00
Bruce
3be45b8221
Add a Variable phase (#433)
* Add a Variable phase

Variable provides a min duration, a delay duration, and an additional duration. The maximum cycle time is min + additional. Once min has been exhausted, if there is demand, the cycle is extended by delay until there isn't any demand or the additional duration has been consumed.

#295
2020-12-24 12:33:47 -08:00
Dustin Carlino
6642c6e1a9 Rename the experiment crate in preparation for a Monday release 2020-12-19 10:01:28 -08:00
Dustin Carlino
799adbbdd4 Fix map loader on web. Remote paths wound up with an extra /, breaking
the deduping between remote and statically bundled files, which broke
one of the map loader panels with duplicate buttons.
2020-12-19 09:51:52 -08:00
Dustin Carlino
23dea95da3 Also deploy the OSM viewer and 15 min tool to the web 2020-12-18 12:36:19 -08:00
Michael Kirk
8b9b3ce2b1
census areas import (#425)
#424
2020-12-14 17:48:47 -08:00
Dustin Carlino
3b9246860a Upgrade winit and glutin. No noticeable changes. [rebuild] 2020-12-11 20:47:00 -08:00
Dustin Carlino
7e376de03f Start transforming an abstract schedule into a specific list of trips 2020-12-10 12:28:12 -08:00
Dustin Carlino
77a37f897b Wire together a UI to generate census-based scenarios 2020-12-10 09:35:50 -08:00
Dustin Carlino
f23dacbde7 Start some skeleton code for tomorrow's hackathon 2020-12-09 22:11:05 -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
Michael Kirk
0e759aa934
replace custom logger with env_logger (#414) 2020-12-07 12:58:47 -08:00
Dustin Carlino
83dee1cf59 Write player JSON data to local storage in WASM. Now progress in the
experiment is saved across browser sessions too!
2020-12-07 11:44:56 -08:00
Dustin Carlino
8af6e1343d Serialize game state on native. Figuring out how to do this on web next... 2020-12-07 11:01:43 -08:00
Dustin Carlino
e03f356a0e Depend on upstream usvg and fontdb, now with pure-Rust rustybuzz support
in web!
2020-12-07 10:30:50 -08:00
Dustin Carlino
08d6f6987f Figure out when we pass a building along a road 2020-12-02 18:00:51 -08:00
Dustin Carlino
f57fb8f2f6 Run the experiment on the web 2020-12-02 13:44:10 -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
c6a204332c Score deliveries based on the number of housing units, and color single-family vs apartments to reflect the points 2020-11-30 11:21:20 -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
966ff76cd3 Let it snow...? Needs considerable work, looks awful. 2020-11-28 19:32:03 -08:00
Dustin Carlino
e589f89922 Add a simple progress bar for updater downloads. #410 2020-11-26 16:12:16 -08:00
Dustin Carlino
58b6c66c2b Consolidate console_log setup into abstutil, now that there are multiple binaries that should all have the behavior. 2020-11-26 14:40:05 -08:00
Dustin Carlino
ca83e7e679 Add some basic functionality to the mysterious experiment 2020-11-24 16:33:29 -08:00
Michael Kirk
61cd74767a
draw route to hovered building (#402)
for #393
2020-11-24 11:30:03 -08:00
Dustin Carlino
c450922211 Split out the 15min tool to its own crate. 2020-11-23 17:58:32 -08:00