Commit Graph

219 Commits

Author SHA1 Message Date
Dustin Carlino
d1d1d1532c Silence warnings when compiling wasm 2020-10-08 12:26:54 -07:00
Dustin Carlino
fa4981787d Bake less huge data files into the .wasm. #21
This has the effect of breaking the city loader, because it lists
bundled files to discover other cities. Going to rethink that next.
2020-10-08 11:33:10 -07:00
Dustin Carlino
64bc4ee318
On the web, load different maps by making asynchronous HTTP calls. #21 (#364)
* On the web, load different maps by making asynchronous HTTP calls. #21

This is a very strange, specializd approach; it's unclear how it'll
generalize to reading scenarios and prebaked results. Ideally we could
call abstutil::read_binary as we currently do and somehow hide this async
trickery underneath, but I'm not sure how yet. In the meantime, this
moves us forward with the hack well-contained.

Next steps for web: stop bundling in all of data/system in the .wasm,
now that we can load from HTTP.
2020-10-08 10:51:13 -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
27d94945c6 Manually move mod block after the use block, to match what CLion does. 2020-10-05 20:29:22 -07:00
Dustin Carlino
bb6dbb0731 Switch from stdweb to websys for #21.
When I added web support in February, it was easier to get started with
stdweb, since it has the nice cargo web tool. However, stdweb is
unmaintained, winit is deprecating support for it, and the next steps
for web (downloading maps dynamically) have better support for web-sys.

With Alvin's guidance, I got
https://github.com/dabreegster/minimal_websys_winit_glow_demo working
first. This PR cuts A/B Street over too.

I tested abst and the widgetry demo in both native and web. The only
major regression from stdweb is the canvas placement and size. I
attempted some fixes, but at this point, I'll leave it as a smaller
followup instead.
2020-10-05 19:50:52 -07:00
Dustin Carlino
5706226790 Also lift list_all_objects. Now the native/web IO stuff has a smaller surface area, making it easier to add more web support for #21. 2020-10-05 15:03:49 -07:00
Dustin Carlino
e5365254e9 Make load_all_objects IO-backend (native/web) agnostic 2020-10-05 14:48:34 -07:00
Dustin Carlino
e973d1e5a1 Organize abstutil io into a native and web crate 2020-10-05 14:16:29 -07:00
Dustin Carlino
dd252d45e2 Remove the long unusued abstutil Profiler (originally for measuring cumulatively how long part of an inner loop takes) 2020-10-05 12:23:26 -07:00
Dustin Carlino
67268f5461 Organize abstutil a little better. Split out modules for generating the data/ paths and for working with serde. 2020-10-05 12:20:52 -07:00
Dustin Carlino
178404bd0e Remove unused RNG stuff from abstutil, and start to think about how to tease it apart a bit 2020-10-05 11:48:29 -07:00
Dustin Carlino
5354d1ba2b Show counts in throughput layer tooltips 2020-10-03 16:04:58 -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
597ef473f2 Upgrade most dependencies 2020-09-24 09:36:26 -07:00
Dustin Carlino
0a3479a3d0 Implement the new file management part of Yuwen's edit mode sidebar UI.
Some bugs introduced when working with the default untitled proposal.
About to change the behavior of that in the next commit.
2020-09-14 13:58:12 -07:00
Michael Kirk
f685af47a5
proletariat robot considers resident/worker capacity (#320)
proles: account for work capacity

previously all residents went to work on the map, but if the
neighborhood is mostly residential that meant they were "competing"
heavily for the scarce jobs available on the map.

with this commit, we do a better job of spreading worker/residential
demand to account for what is available, and fill in the gap with
off-map trip origins/desitinations.

e.g. if a neighborhood is mostly residential, we have folks commute off
of map. If a neighborhood is mostly commercial, we have folks commute
into the map.
2020-09-10 14:04:20 -07:00
Dustin Carlino
c5bf1fcb74 Fix saving scenarios, broken in 65e07d9cc7 2020-09-08 08:24:23 -07:00
Dustin Carlino
65e07d9cc7 Read/write scenarios in JSON, so people can manipulate them in any language. #313 2020-09-04 10:57:52 -07:00
Dustin Carlino
787b6046b6 Remove the RAM measurement utility. Only work on Linux, I'm not convinced it's correct, and the information isn't useful to see 2020-09-03 17:19:40 -07:00
Dustin Carlino
2935d2379b Mechanical rename of ezgui -> widgetry, a much better name to enchant the Rust community. #253 [rebuild] 2020-08-27 10:37:04 -07:00
Dustin Carlino
2c5bbd3e7e Use alternate language building names and amenities, when available. Fixes #271.
Tested in Shinjuku. No substantial file size increase for any maps.
2020-08-20 10:39:28 -07:00
Dustin Carlino
5c337e2e8e Add some methods to the headless API for manipulating traffic signals, and start a Python client example. Everything still WIP. 2020-08-18 11:31:20 -07:00
Dustin Carlino
43a6edbc28 regenerate everything, prep for release. [rebuild]
lakeslice still gridlocks and lots of bus routes cut out. not the
happiest release.
2020-08-08 21:33:11 -07:00
Dustin Carlino
ad3a0398bb stop missing panics even after long Timer notes 2020-08-08 19:38:32 -07:00
Dustin Carlino
74426aaf94 get ezgui demo running in wasm 2020-08-07 19:49:43 -07:00
Dustin Carlino
e35c69f6f3 ezgui Wizard (and its pet Cloneable)
Here lies a weird coroutine experiment
09/20/2018 - 08/07/2020
2020-08-07 14:04:41 -07:00
Dustin Carlino
1b993544ab print logs from fast_paths 2020-08-01 08:27:09 -07:00
Dustin Carlino
328cbcd1f1 stop melting my laptop when generating scenarios 2020-07-23 09:15:25 -07:00
Dustin Carlino
f1ef02b907 store Tags in map_model objects, to reap its benefits anywhere in the codebase. serialization format doesnt change! 2020-07-23 07:43:50 -07:00
Dustin Carlino
35b761ec21 get sydney to import 2020-07-20 20:54:08 -07:00
Dustin Carlino
b6a8bdd7e1 merge adjacent residential blocks into larger groups. slow
implementation, but the result looks nice
2020-07-18 13:09:10 -07:00
Dustin Carlino
a5cf34ff59 refactor the osm tags helper 2020-07-14 09:03:37 -07:00
Dustin Carlino
07ed1fec95 more polyline work... get rid of Warn<>. extremely spammy and hasn't
been helpful in ages.
2020-07-11 15:17:16 -07:00
Dustin Carlino
4340ad585b convert the rest of usize IDs to u32. savings:
maps: 645mb -> 625mb
scenarios: 431mb -> 390mb (before all the u32 optimizations, this as
500mb!!!)
prebaked: 80mb -> 73mb

and while I'm at it, grab fresh OSM, with lots of manual lane fixes,
especially near divided highways
2020-07-09 11:43:34 -07:00
Dustin Carlino
e50cd77675 fix #160 properly -- expand to /home/dabreegster at runtime 2020-07-07 17:16:26 -07:00
Dustin Carlino
9a27f6d3dd cleanup the old abstutil Error 2020-07-07 17:09:51 -07:00
Dustin Carlino
d1fdcbbd59 fix more relative dir bugs. allow different directory for player data too. fixes #160 2020-07-07 16:49:46 -07:00
Dustin Carlino
4aaa41dd13 zip screenshots in dropbox, because managing individual files keeps crashing the daemon 2020-07-07 16:31:52 -07:00
Dustin Carlino
3eb8db3f75 interpret OSM center lines as the physical center of the road (excluding
sidewalks), not as the divider between the two directions. this
dramatically changes geometry everywhere for the better.

thanks to
https://wiki.openstreetmap.org/wiki/Proposed_features/placement for
clear explanations. will be looking next at interpreting this tag.

also temporarily removing screenshots, because uploading individual
files and waiting for dropbox to sync isn't sustainable
2020-07-07 15:52:51 -07:00
Dustin Carlino
9f72b3dd51 cleanup after the relative dir fix, and add support for hardcoding the
data dir, for #137
2020-07-07 12:14:02 -07:00
Dustin Carlino
6919c24bf8 detect the data/ dir more intelligently. fixes #73. still need to
- consider collapsing the directory structure in the releases
- fix wasm

[rebuild]
2020-07-07 11:09:35 -07:00
Dustin Carlino
c191ffde9a filter out broken edits (which happen due to schema changes) 2020-06-30 19:48:25 -07:00
Dustin Carlino
eedf80bfef tiny tweaks from final testing:
- cutscene wording
- elide traffic tab on parking lanes
- dont crash when traffic signal data needs fixing, just warn more
loudly. this lets lanes near some signals actually be modified
2020-06-21 11:38:34 -07:00
Dustin Carlino
a96b77ba3f more granular profiling 2020-06-09 18:56:33 -07:00
Dustin Carlino
49dee41b3c bin Counter values based on value, handling dupes. particularly
noticeable for bike lane layer
2020-06-01 09:35:29 -07:00
Dustin Carlino
8c77cdd889 validation for naming edits. fixes #35. also improve how wizards manage
textboxes when parsing fails
2020-05-24 11:52:32 -07:00
Dustin Carlino
2aebf31669 remove shortcuts feature. UX has issues -- need proper way to edit, delete, reorder shortcuts. never seen clear use case for this. fixes #37, #38, #39 2020-05-24 11:35:52 -07:00
Dustin Carlino
ddf6de5f59 stop dependending directly on serde_derive 2020-05-19 15:06:32 -07:00
Dustin Carlino
a362c73689 plumb trips per parcel tooand add more queries, make a kml chooser 2020-05-16 13:24:58 -07:00