Commit Graph

93 Commits

Author SHA1 Message Date
Dustin Carlino
ce473928fa Use u64 to describe number of bytes in the Manifest, now that we have a massive GeoTIFF in there that breaks wasm's 2^32 usize limit. #586 2021-03-24 21:23:38 -07:00
Dustin Carlino
2eeee65653 Start to integrate Eldan's elevation_lookups tool. #82
So far, just call it for Seattle maps. Store the data sources in S3.

Note this'll only run on my machine right now, unless you also build the
Docker image locally. Failures in elevation should be skipped for now.
2021-03-18 11:18:05 -07:00
Dustin Carlino
a0c82088b9 Use our native download function instead of external curl command from the importer. #523
This forces the main importer to include tokio and propagate async a
bit. That seems worth it.

Also removed the quiet param from the download helpers; we always want
progress.
2021-03-17 10:29:28 -07:00
Dustin Carlino
77709a24d6 Refactor a method to asynchronously download a file on native, with a simple progress bar. #523
Use it in the updater and all the importer tools. Only place it's not
used yet is parking_mapper and the in-game updater.  [rebuild]

Also make the RunCommand state understand the control code for erasing
the current line. It... sort of works.
2021-03-15 19:51:45 -07:00
Dustin Carlino
f0b522f89a Figure out which files are in the us/huge_seattle DataPack more consistently. This'll now work from the proposals screen. 2021-03-10 12:40:55 -08:00
Dustin Carlino
006ae01216 Move 4 Seattle maps into the us/huge_seattle category to reduce the size
of the binary releases. [rebuild]

Handle this special case in the city picker UI, prompting the player to
do the extra download. NOT yet handling the same for the community
proposal screen -- player will just see a missing file error.
2021-03-03 18:03:15 -08:00
Dustin Carlino
4468240564 Parallelize file compression in the updater tool. Untested, but about to stress it... 2021-02-26 15:55:41 -08:00
Dustin Carlino
357ba15afe Add back the zcool font so the Taipei map renders names. But this time, asynchronously load the font instead of bundling it in system assets and increasing the .wasm size. #535
Temporarily take on some technical debt with the new RawFileLoader...
2021-02-25 15:25:47 -08:00
Dustin Carlino
92e0c5c0af Clean up empty directories in the updater. Especially for people
updating past things like the country code split, this prevents the game
from later crashing when it finds unexpected old directories.
2021-02-25 13:02:26 -08:00
Dustin Carlino
39f5d50fcd The grand country split. #326
City names are now disambiguated by a two-letter country code. This
commit handles almost everything needed to make this transition. Main
next steps are fixing up map edits automatically and making the city
picker UI understand the extra level of hierarchy.

A little bit of fallout: lakeslice gridlocks again; this regression is
actually from the recent traffic signal changes, but I'm just now
regenerating everything. Will fix soon.
2021-02-13 15:45:59 -08:00
Dustin Carlino
1e635d682d Generate an updater config file to opt into everything. When I import new places, I need to personally run this, or I'll erase my own imports later. 2021-02-11 15:45:42 -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
802a647a81 Import Providence for a student project. 2021-01-27 15:34:54 -08:00
Dustin Carlino
9ddf658e96 Dedupe must_run_cmd. I think I did this before updater took a dependency on abstutil. 2021-01-19 14:41:56 -08:00
Dustin Carlino
30dc328f06 Compute md5sums in the updater in parallel. From 26s down to 6s! 2021-01-19 14:20:40 -08:00
Dustin Carlino
2837808206 Let the updater diff a single file to see if it's changed. Easier than md5sum and grepping data/MANIFEST. 2021-01-16 09:05:19 -08:00
Dustin Carlino
a7f3e998b7 Start to generate two simple scenario from actdev desire lines. https://github.com/cyipt/actdev/issues/32 2021-01-14 10:31:21 -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
965d999199 Upgrade misc other dependencies 2021-01-03 20:01:27 -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
d7afe4d318 Add a fastpath to the updater to 'download' from a local copy, to undo local temporary work more easily. 2020-12-31 12:44:31 -08:00
Dustin Carlino
001aa836d2 Organize assets that're baked into widgetry. They don't belong in the
data/ directory, because they're statically bundled; they're not
actually read from the filesystem. #253

Two SVGs get duplicated between widgetry and abst assets -- dont_walk
and arrow_drop_down.
2020-12-28 10:40:55 -08:00
Dustin Carlino
14f692fc39 Turn more code in the importer into config. Ideally we just have code
for all the custom extra import data. #326

Verified there are no changes when importing the affected cities (except
for renaming the original OSM input file for Leeds to match the
geofabrik source)

Woops, and fix updater uploading with the compressed_size_bytes change.
2020-12-22 13:38:29 -08:00
Dustin Carlino
0fc0b8db65 Distinguish uncompressed/gzipped size in the updater tool. #377 2020-12-21 15:32:09 -08:00
Dustin Carlino
be3d1dc83b Refactor github workflow, since most steps are OS-independent. Build all of the separate binaries. [rebuild] [release] 2020-11-29 16:01:18 -08:00
Dustin Carlino
e589f89922 Add a simple progress bar for updater downloads. #410 2020-11-26 16:12:16 -08:00
Dustin Carlino
b9bf23e420 Downgrade tokio. aa966d7533 broke headless and updater. Blocked on https://github.com/seanmonstar/reqwest/issues/1060 2020-11-12 10:31:52 -08:00
Dustin Carlino
aa966d7533 Upgrade a bunch of dependencies 2020-11-11 12:02:53 -08:00
Dustin Carlino
1338a92dac Let the updater pin to a release, for packaging releases for other platforms. #195 2020-11-09 11:36:12 -08:00
Dustin Carlino
1b4e25e12f Get the downloader UI to actually fetch stuff. #326 2020-11-07 18:39:15 -08:00
Dustin Carlino
54ced5b5b4 Stub out a native-only UI to download extra cities. Move the config
about what cities somebody has opted into downloading to JSON and a more
common place. #326

Note this is a breaking change for this config file, but I don't think
many people have started using this yet.
2020-11-07 16:20:27 -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
a5e1f75146 Fix uploader, broken by a too-quick collapsing of branches in e15efa9002 2020-11-06 09:04:28 -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
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
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
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
eb7ee6d57d Fix a few build warnings and breaks, and document the headless server a
bit more
2020-10-14 10:46:18 -05: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
62b3af324b Bundle data/MANIFEST.json in wasm. Now loading all maps from HTTP works! #21 2020-10-08 14:41:02 -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
989d5243b1 Move the data/manifest utils to abstutil, so the game crate can know
about all files that exist, even if they're not downloaded locally
(native) or to load other maps (web)
2020-10-08 12:50:18 -07:00
Dustin Carlino
f258c50595 Organize import blocks using https://github.com/dabreegster/organize_rust_imports 2020-10-05 20:29:22 -07:00
Dustin Carlino
597ef473f2 Upgrade most dependencies 2020-09-24 09:36:26 -07:00