Commit Graph

5434 Commits

Author SHA1 Message Date
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
Dustin Carlino
ff829db8f1 Expanding the boundary of huge_seattle, and creating a new north_seattle map 2020-11-25 08:56:55 -08:00
Dustin Carlino
ca83e7e679 Add some basic functionality to the mysterious experiment 2020-11-24 16:33:29 -08:00
Dustin Carlino
903eab1bc4 Remove some old savestating optimizations from the simulation. The
optimizations avoided serializing Analytics and paths of to-be-created
agents, to reduce the file size. The logic to manage all of this isn't
worth the complexity anymore, because:

1) We don't queue up a bunch of spawn commands anymore; we defer
pathfinding until the last minute anyway.

2) We're not using savestates except for occasional manual debugging.
Previously, there was an idea to quickly preview prebaked traffic
mid-day. That idea was never fleshed out.
2020-11-24 15:38:20 -08:00
Dustin Carlino
ab88010ed0
Refactor PathRequest creators that go between two buildings. #176 (#404) 2020-11-24 13:21:44 -08:00
Dustin Carlino
314f01496e Save/restore camera state per map in all map_gui apps too. 2020-11-24 11:53:50 -08:00
Michael Kirk
61cd74767a
draw route to hovered building (#402)
for #393
2020-11-24 11:30:03 -08:00
Dustin Carlino
16b561a408 Move game/helpers into game/common. And fix github rustdoc workflow 2020-11-23 23:39:55 -08:00
Dustin Carlino
5e952f9012 Fix web build break from a cfg() line creeping down 2020-11-23 18:01:42 -08:00
Dustin Carlino
db736ceab5 Collapse some of the module indirections in the game crate. 2020-11-23 17:58:32 -08:00
Dustin Carlino
f3ff910c37 Cleanup from the great app split:
- move show_zorder into DrawMap
- reorganize modules in map_gui

Next is to reorganize/collapse modules in game.
2020-11-23 17:58:32 -08:00
Dustin Carlino
c450922211 Split out the 15min tool to its own crate. 2020-11-23 17:58:32 -08:00
Dustin Carlino
9f422033e9 Make a SimpleMinimap for map_gui. Will refactor later. 2020-11-23 17:58:32 -08:00
Dustin Carlino
c3db4de087 Lift the Navigator tools to map_gui. 2020-11-23 17:58:32 -08:00
Dustin Carlino
139d435bd3 Split out the OSM viewer to its own crate, porting over a simple form of current_selection. Temporarily omit the minimap and navigator from it. 2020-11-23 17:58:32 -08:00
Dustin Carlino
6568c9e959 Add mouseover to the split parking mapper, sadly just by copying a simpler version of the code... 2020-11-23 17:58:32 -08:00
Dustin Carlino
ad0d1ae7a4 Split out the OSM parking mapper into a separate app, temporarily
WITHOUT mouseover.
2020-11-23 17:58:32 -08:00
Dustin Carlino
e6d21d81e7 Add the city picker to the experiment, as a way to lift it to map_gui. 2020-11-23 17:58:32 -08:00
Dustin Carlino
859d78f2cf Refactor the CLI flag parsing that all apps will share. 2020-11-23 17:58:32 -08:00
Dustin Carlino
ab2f6fefec Split the controls experiment into a separate binary, get it to draw a
map way more simply than the game
2020-11-23 17:58:32 -08:00
Dustin Carlino
558eb6f716 Extract DrawMap into a separate crate, along with everything else it
depends on.

The goal is to be able to split things like the OSM viewer, parking
mapper, and 15 min tool into separate crates from the game, while still
sharing lots of code.
2020-11-23 17:58:32 -08:00
Dustin Carlino
67446d32b9 Refactor and rearrange misc App/PerMap things to prepare for extracting some shared functionality to other crates. 2020-11-22 19:48:09 -08:00
Dustin Carlino
f7504bf4d1 Tease AgentCache out of DrawMap 2020-11-22 19:35:35 -08:00