Commit Graph

4527 Commits

Author SHA1 Message Date
Dustin Carlino
ebe1f486f7 flatten some of the map building code 2020-07-02 10:48:05 -07:00
Dustin Carlino
3acec91f51 get berlin import working for #119. just had to allow a few more turn
restrictions previously unencountered and deal with weird geometry.
and add some hints to docs for #118.
2020-07-02 09:56:48 -07:00
Dustin Carlino
519bceaac0 organize lots of map modules under objects/ 2020-07-02 09:05:56 -07:00
Dustin Carlino
148547c622 reorganize code in map_model, since map.rs is huge.
- move Map to lib.rs, so all its private members can be directly
  populated by submodules
- move edits-related stuff to edits.rs
- move raw->map stuff to make/mod.rs
2020-07-02 08:56:09 -07:00
Dustin Carlino
eb2be71a65 adjust new city docs for #117 2020-07-02 06:58:30 -07:00
Dustin Carlino
7d4cf4cd5b follow up to #59. when we do the no-op events, have to plumb back
updates. this is needed when we push on new states to warp somewhere or
jump to a time or do anything else requesting updates
2020-07-01 22:07:54 -07:00
Dustin Carlino
72d0171300 fix #111 by delaying constructing ControlTrafficSignal from edits. also
fix time warp screen issue after the UpdateType changes [rebuild]
2020-07-01 19:34:15 -07:00
Dustin Carlino
a62e3133db cleanup after #59:
- cargo fmt
- update some comments
- remove EventLoopMode
- if no updates are requested, that's the equivalent of InputOnly
2020-07-01 17:57:43 -07:00
Javed Nissar
1f58cbf16d
Refactor event update loop (#59)
* Refactor event update loop to enable multiple game update types

* Implement pan event to improve panning with cursor at edge of screen and
fixed formatting
2020-07-01 17:47:30 -07:00
Dustin Carlino
1422643973 finish the ezgui layout refactor. most things are way more consistent now, and with less code 2020-07-01 15:39:04 -07:00
Dustin Carlino
834f060462 yet more layout refactor 2020-07-01 15:31:52 -07:00
Dustin Carlino
f9cfe136e0 new save edits UI, not using wizard. using for:
- save as dialog
- loading new edits

still TODO:

- leaving sandbox mode
- final score challenge screen

part of #110
2020-07-01 13:11:58 -07:00
Dustin Carlino
ef51a8b9b8 more layout refactor 2020-07-01 12:11:00 -07:00
Dustin Carlino
54b4bd318e way simpler approach for two-step walking paths. fixes the silly loops. 2020-07-01 11:12:47 -07:00
Dustin Carlino
c61371a777 variant of row/col that have good default margins. starting a big
refactor to make everything consistent. not sure mechanical refactor is
right here. lots left, but a start.
2020-07-01 09:50:35 -07:00
Dustin Carlino
f90e506fbf the important stuff: adding a face browser to the ezgui demo 2020-07-01 09:04:55 -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
9b42d27e85 finally enable two-step pathfinding for pedestrians too. the weird hack
making this work: pedestrians will sometimes add an extra little
back-and-forth in their paths
2020-06-30 14:52:57 -07:00
Dustin Carlino
6696263a08 fix map_editor and headless build break, for #108 2020-06-30 13:49:24 -07:00
Dustin Carlino
2c7440b03f start representing access restrictions by mode 2020-06-30 13:15:57 -07:00
Dustin Carlino
2b4bf1172b start a UI for modifying access restrictions of zones. mostly just the
skeleton right now
2020-06-30 12:16:08 -07:00
Dustin Carlino
2b50e7969c refactor position 2020-06-29 20:55:36 -07:00
Dustin Carlino
71b8e16448 another stab at two-step walking pathfinding. prevents all crashes, but
pretty much nothing being found
2020-06-29 20:40:41 -07:00
Dustin Carlino
2e1612c3db try to handle walking around private zones too. gluing the paths
together is buggy, giving up for now and leaving disabled
2020-06-29 16:44:45 -07:00
Dustin Carlino
694b70c438 try something simpler for two-step pathfinding. maybe some code duplication, but way easier to reason about. i think this is now correct; just need equivalent for walking trips 2020-06-29 13:50:05 -07:00
Dustin Carlino
fafda7963b handle more cases for two-step pathfinding, but still many not working.
need to pull the main path search in
2020-06-29 12:03:34 -07:00
Dustin Carlino
4cd674ca35 start two-step pathfinding for starting/ending in private zones. not
handling interior trips or walking yet. failing to find a path in many
cases, but it's a first step.
2020-06-29 11:30:00 -07:00
Dustin Carlino
1617a3d3c1 skip missing maps in the city picker 2020-06-29 09:36:37 -07:00
Dustin Carlino
55266c25a8 new release 2020-06-28 19:49:55 -07:00
Dustin Carlino
6e6c27fcc4 another attempt to fix mac [rebuild] 2020-06-28 19:30:03 -07:00
Dustin Carlino
ac993115f5 workaround usvg mac build break [rebuild] 2020-06-28 19:05:44 -07:00
Dustin Carlino
a103c84a40 cluster private roads into zones. don't surface in the UI yet [rebuild] 2020-06-28 18:11:13 -07:00
Dustin Carlino
c97bd0fe4b some cleanup after #106. unbreak importer 2020-06-28 11:13:35 -07:00
phimuemue
a675e72d25
Avoid collect et al (#106)
* Avoid unconditional collect in get_lane_types

* Introduce Road::children(fwds)

Simplifies direction-aware lane retrieval.

* Simplify all_lanes

* Avoid unneeded collect

* Avoid some Vec copying

* Avoid unconditional collect

* Avoid some collect

* Avoid clone

* Avoid collect

* Avoid collect

* Avoid collect

* Avoid collect

* Avoid collect

* Avoid collect

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2020-06-28 11:00:09 -07:00
Dustin Carlino
63d16a16c3 speed up the trip table tab. on lakeslice at 8am, down from ~0.3s to
~0.005s in release mode
2020-06-28 10:44:21 -07:00
Dustin Carlino
bb3da1f8eb Make a very primitive form of adaptive traffic signal phases. It should
be easier to write better policies now; this mostly does the work of
changing the map model and UI to handle variable timing. A small step
towards #91
2020-06-28 10:20:47 -07:00
Dustin Carlino
2733d3e791 pull down fresh OSM data, with some fixes along mlk. handle west seattle
bridge being tagged differently. also note some streets in CHAZ/CHOP
disappeared, because they're tagged as pedestrian ways currently. also
forced to pull down fresh traffic signal data to keep lakeslice running
2020-06-27 22:27:03 -07:00
Dustin Carlino
ae6c099bd5 start bringing in private broadmoor roads. omit from the CH, so trips will just fail without a path for now. 2020-06-27 16:19:48 -07:00
Dustin Carlino
a6b90d00d8 very simple modifier to cancel all trips for some percentage of people 2020-06-27 14:20:25 -07:00
Dustin Carlino
455b17faef start playing around with manchester 2020-06-27 12:32:03 -07:00
Dustin Carlino
90b556ac1f carve out a way to modify the weekday scenario in the UI. express the 5 day repeat using this 2020-06-27 11:56:45 -07:00
Dustin Carlino
2881341b63 make parking lots hideable. dont snap parking and sidewalk hints to
light rail. not regenerating all the maps again yet to avoid some churn
2020-06-26 17:02:14 -07:00
Dustin Carlino
eab0988bd8 hello light rail! just import the tracks, represent as a new lane type.
make clipping handle starts and ends separately
2020-06-26 16:47:18 -07:00
Dustin Carlino
16beebd1de use underlining to refer to edits, not quotes. only in some places. :\ 2020-06-26 14:13:12 -07:00
Dustin Carlino
bfd1b9c190 rotate labels on buses, now that i figured out how to do it reasonably on roads 2020-06-26 11:31:27 -07:00
Dustin Carlino
77fa6eb43d switch to upstream usvg, now with support for a loaded-once fontdb that
only uses bundled fonts, not system fonts. side effect is that
apparently the overpass font doesn't have ▼, so switch to a silly down
arrow for now
2020-06-26 11:22:22 -07:00
Dustin Carlino
ccb93d198f add a third opengl fallback that expresses no pixel reqs whatsoever, for #103 [rebuild] 2020-06-25 17:20:32 -07:00
Dustin Carlino
d254d49591 discard way less buildings, and match driveways away from intersections
more carefully
2020-06-25 16:34:44 -07:00
Dustin Carlino
7fa26dfc90 add a mode to draw every zoomed agent, to help flush out bugs like #98 and #72 faster 2020-06-25 10:55:17 -07:00
Dustin Carlino
b3a480b4c1 clean up old trip positions from Sim. implement the all-route debugger
in a more straightforward way
2020-06-25 09:20:54 -07:00