Dustin Carlino
17e850908c
Reorganizing pathfinder code to prepare for sharing the start/stop-in-a-zone logic between the CH and Dijkstra implementation. #411
2020-12-02 09:22:16 -08:00
Dustin Carlino
69b14e444f
Simpler abstutil APIs: return string errors immediately, don't make callers transform. We don't need to distinguish different error types anywhere.
2020-12-02 08:44:07 -08:00
Dustin Carlino
01737ea0c5
Update prebaked data after #412
2020-12-01 19:22:32 -08:00
Michael Kirk
09e484b2a3
change default log level
2020-12-01 19:20:53 -08:00
Michael Kirk
ddfaf73eae
Improve lane changing vis-a-vis uber turns.
...
1. Allow lane changing in an uber turn. Because of the way uber turns
work, we lock in and commit to all the lane changes just before
entering the uber turn.
2. Avoid overzealous lane changing by combining number-of-lanes-crossed
and numer-of-vehicles-in-lane into a single cost, rather than always
preferring the least number-of-vehicles-in-lane.
3. Don't lane-change unless the candidate lane's cost is strictly better
than the current lane cost.
2020-12-01 19:20:53 -08:00
Michael Kirk
dab38e36ac
fixup! map_err -> or_else
2020-12-01 17:49:41 -08:00
Michael Kirk
9ebd939b3f
map_err -> or_else
2020-12-01 17:49:41 -08:00
Michael Kirk
4a9cfab935
fallback for shader versions
2020-12-01 17:49:41 -08:00
Michael Kirk
4f2cf1a714
context builder fallbacks
2020-12-01 17:49:41 -08:00
Dustin Carlino
30ce82bd3c
Collapse get_pathfinding_request from TripSpec into start_trip. Avoids double-calculating paths (for driving trips, because of capping) and consolidates logic a bit more. #258
2020-12-01 16:42:36 -08:00
Dustin Carlino
14fd697282
Collapse/consolidate some logic involving DrivingGoal and TripEndpoint. #258
2020-12-01 16:04:48 -08:00
Dustin Carlino
d0b25d3530
Slightly refactor spawning cars during trip transitions #258
2020-12-01 15:30:17 -08:00
Dustin Carlino
4f764d6b87
Plumb options for delaying capped trips, instead of cancelling. Don't actually handle it yet. #325
2020-12-01 14:37:55 -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
2ebaf99e0d
A fresh attempt at finding the root causes of gridlock map-wide
2020-12-01 10:50:05 -08:00
Dustin Carlino
b5ea263fc1
Expose the blocked-by graph through the API, and add root-cause analysis
...
to the UI debugger. #392
2020-11-30 17:01:15 -08:00
Dustin Carlino
8501ec70f9
Make the blocked-by graph more exploreable. Remove older debug code that
...
did something similar. #392
2020-11-30 15:15:13 -08:00
Dustin Carlino
6dd14c8bed
Don't crash when jumping to nonexistent trip or when clicking
...
follow/unfollow for a trip without an agent.
2020-11-30 14:20:37 -08:00
Dustin Carlino
3eda17627b
Handle binary or JSON scenarios
2020-11-30 14:00:19 -08:00
Dustin Carlino
6b736b48e5
Add instructions. [rebuild]
2020-11-30 11:39:31 -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
8ee3466815
new release
2020-11-29 17:02:34 -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
057587076c
Split config for different levels, add some sort of title screen
2020-11-29 15:44:45 -08:00
Dustin Carlino
2716c44bf7
Fix commuter patterns dashboard, which broke whenever we cleared the sim upon setup
2020-11-29 08:59:10 -08:00
Dustin Carlino
fe7a3e44f6
Instructions to recharge
2020-11-28 21:00:00 -08:00
Dustin Carlino
51d4f4dac8
When out of energy, point to a depot.
2020-11-28 20:47:49 -08:00
Dustin Carlino
966ff76cd3
Let it snow...? Needs considerable work, looks awful.
2020-11-28 19:32:03 -08:00
Dustin Carlino
f030086e8e
Overhaul how buildings get colored in different states, and reset things
...
when changing depots
2020-11-28 17:07:14 -08:00
Dustin Carlino
02d5e3cea3
Express energy and points needed to next upzone as meters, not text
2020-11-28 16:11:08 -08:00
Dustin Carlino
d6c179385e
Start in night mode, and adjust minimap coloring there
2020-11-28 10:19:21 -08:00
Dustin Carlino
fad0358553
Experiment with animation
2020-11-28 10:12:00 -08:00
Dustin Carlino
4b28cfe806
Add a minimap
2020-11-28 09:45:58 -08:00
Dustin Carlino
b6484f31d4
Upzoning
2020-11-27 17:42:58 -08:00
Dustin Carlino
ab18b72b4c
Can't move while recharging. Slow down when out of energy.
2020-11-27 10:12:00 -08:00
Dustin Carlino
fddfd680de
Recharge energy
2020-11-27 09:41:34 -08:00
Dustin Carlino
62dc979677
Add a second meter to the experiment.
2020-11-26 16:47:12 -08:00
Dustin Carlino
e589f89922
Add a simple progress bar for updater downloads. #410
2020-11-26 16:12:16 -08:00
Dustin Carlino
312baa868e
Silence some logging from hyper. #410
2020-11-26 15:50:23 -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
ebcae62652
Slightly simplify how some states specify what map objects can be
...
selected and clicked on.
2020-11-26 13:42:31 -08:00
Dustin Carlino
65a4b578be
Experiment with separating concerns in some simple States.
...
This is closer to a callback style, which might be more familiar to
people coming from other frameworks.
It's a pretty mechanical refactor now, but the hope is that looking at a
bunch of on_mouseover() functions will reveal further refactors more
easily than a bunch of monolithic event() functions.
I don't think every State fits this pattern; things like SandboxMode
need to carefully orchestrate the order of things. Make simple things
easy and hard things possible.
2020-11-26 13:11:12 -08:00
Dustin Carlino
b7f3f2113b
Start refactoring a common UI pattern: recalculate some value only when ( #406 )
...
Start refactoring a common UI pattern: recalculate some value only when
a key changes.
It's quite verbose right now for some widgetry States to determine if
the mouse is over a particular type of object, check if that object has
changed since the last time, and calculate something based on it. This
introduces a new helper for expressing the pattern a little more
clearly.
2020-11-25 12:22:11 -08:00
Dustin Carlino
70b40a7148
Stop doing custom stuff to spawn scenarios in the tutorial. Integrate
...
with SandboxLoader, which handles loading prebaked results on the web
correctly. #407
2020-11-25 12:15:22 -08:00
Dustin Carlino
4b6df883fb
Organize challenges into a subdirectory, splitting out prebaking code
...
and bringing in cutscene, just to organize things a little better.
2020-11-25 11:31:37 -08:00
Dustin Carlino
2672eb837c
Remove the unused total_lanes from Path
2020-11-25 11:21:15 -08:00
Dustin Carlino
b6ebee0dd8
Tiny refactor: Drawable::empty(ctx)
2020-11-25 11:19:26 -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