Commit Graph

2200 Commits

Author SHA1 Message Date
Michael Kirk
c6d361c4b0 remove take_menu 2021-02-24 18:10:06 -08:00
Dustin Carlino
5577021ee5 When merging intersections and preserving simple turn restrictions, pay
attention to which intersection is being destroyed. Fixes #527 --
montlake and phinney both look correct now.

Regenerating everything. Actually, Phinney now runs, so adding a 4th
prebaked map!!! But Rainier regressed -- there's an issue with the
signal heuristics that's now a problem; I'll fix later.
2021-02-24 15:16:12 -08:00
Michael Kirk
d774aeae44 rename toggle/checkbox 2021-02-24 14:59:47 -08:00
Dustin Carlino
23b19fa7ce Add a quick debug tool to find roads with no turns between them, for #527 2021-02-24 11:00:59 -08:00
Michael Kirk
3ab7fc4361
Fix tooltips and hotkey for day-theme (#528) 2021-02-24 10:52:57 -08:00
Dustin Carlino
b36ebec0b9 Penalize unprotected left turns at the routing layer. #494
I experimented on the Rainier Valley map, which recently started
gridlocking due to too many cars doing this, to tune the value. Got it
running again! The two other maps keep running, with some trips on
average getting a little slower.
2021-02-23 19:32:00 -08:00
Dustin Carlino
0344e51170
Merge pull request #525 from a-b-street/prefetch
Make a web loader that can 'prefetch' abst in the background. cyipt/a…
2021-02-23 13:34:55 -08:00
Dustin Carlino
4c97687a5b Make a web loader that can 'prefetch' abst in the background. cyipt/actdev-ui#15 2021-02-23 11:45:39 -08:00
Michael Kirk
62a433ed8d btn_solid_panel is the same as btn_solid 2021-02-23 10:17:49 -08:00
Michael Kirk
e6ed2e67de Collapse button styles to be theme specified (no visible changes).
Button colors are now determined by the color scheme, but for now all
schemes are hardcoded to use the same "night" button colors. Read on for
rationale...

Previously, which button colors to use (dark/light) was specified inline
while building the UI.

Eventually we want to live in a world where color scheme determines:
- panel colors
- button colors
- text colors

The theme could already choose panel colors easily enough, but because
the buttons and text were not determined by theme, choosing anything
other than a black or dark grey panel color makes the buttons and text
unreadable.

This PR tackled the themeable "button colors" portion, but all themes
continue to use the "night" colors for now, because using the actual
"day" colors would still make the text unreadable.

next up: themeable text!

The one intentional regression is within the pregame tutorial,
which has always been styled differently from the rest of the app. An
expeditious hack has caused the prev/next/continue buttons to lose their
visible hover state. I'll restore this upon completing the day theme
work.
2021-02-23 09:52:33 -08:00
Dustin Carlino
ecf7c0c836
On HiDPI screens with low resolution, allow widgetry applications to (#521)
* On HiDPI screens with low resolution, allow widgetry applications to
override the default scale factor in order to achieve a minimum width.
2021-02-22 15:59:57 -08:00
Dustin Carlino
a7de2eef14 Disable parking simulation for actdev. I noticed people in Poundbury walking very far just to fetch their car, because the data about available parking is nonexistent. 2021-02-20 13:19:38 -08:00
Dustin Carlino
c7ae44d02a Start actdev simulations at 8, not 6. And refactor the ffw-after-starting pattern. cyipt/actdev#66 2021-02-20 13:12:41 -08:00
Dustin Carlino
0804f877dd Toggle between the baseline/go active scenario in actdev mode. Don't allow opening up any scenario. If we settle on a good background traffic generator, that can probably be exposed as an orthogonal checkbox. cyipt/actdev#66 2021-02-20 13:03:42 -08:00
Dustin Carlino
7592d192e3 Rename the blog gameplay mode to actdev, since it's specific to that integration. In the future if we have a simplified simulation running in a blog, we can figure out common requirements and refactor. 2021-02-20 12:44:27 -08:00
Dustin Carlino
b11cd48fb3 On the web, constantly update the --cam param in the URL with the current viewport. 2021-02-20 11:10:14 -08:00
Dustin Carlino
05622760fc Fix crash when opening the tutorial when the wrong map is previously opened. 2021-02-19 10:15:48 -08:00
Dustin Carlino
2d182a4582 Fix crash in commuter viz layer. The block-finding algorithm was written before pedestrian-only roads. 2021-02-17 12:00:13 -08:00
Dustin Carlino
4de7cb68c0 Start actdev mode with the baseline scenario, if it exists. Improve the follow shortcut. cyipt/actdev#66 2021-02-16 17:58:20 -08:00
Dustin Carlino
12d73e10bc Add a few shortcut buttons to the actdev UI. cyipt/actdev#66 2021-02-16 17:34:56 -08:00
Dustin Carlino
3f23a3c57c Remove hotkey buttons entirely, to get closer to Yuwen's button spec. 2021-02-15 13:02:29 -08:00
Dustin Carlino
bc2767b89e Refactor lots of places that construct paths to the data/input dir, which is always organized by city. This would've made the previous change way easier. #326 2021-02-13 18:30:01 -08:00
Dustin Carlino
52ca5f5ede Fix lakeslice gridlock with a manual signal policy at 23rd/Rainier. 2021-02-13 17:44:34 -08:00
Dustin Carlino
0f1c30a889 Exclude collisions.bin from KML viewer; it's not KML anymore.
And fix a crash on the challenges screen by not considering the actions
of inactive buttons to count as duplicates.
2021-02-13 17:06:06 -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
a938b9c1e2 Move building procgen to a standalone tool. 2021-02-12 16:28:15 -08:00
Dustin Carlino
c43af59004 Change the building procgen algorithm to just use the Map, now DrawMap. Preparing to move it into the import phase, where we won't be able to generate the DrawMap. 2021-02-12 16:06:49 -08:00
Dustin Carlino
8d0718d37d
On the web, modify the current URL as we change maps and scenarios. (#509) 2021-02-12 15:14:09 -08:00
Dustin Carlino
03538faf3f
A few traffic signal cleanups: (#512)
- Stop alerting when slow pedestrians can't make it through the minimum
  crosswalk time
- Simpler iteration style in lagging_green.rs
- Totally delete the old brute force signal config code; it never worked
  well, and the improved heuristics eliminate the need for it anyway
- Make a Duration::max function and use it in one case
2021-02-12 15:10:32 -08:00
Dustin Carlino
aacc0fa4d5 Fix a crash that happens when you load edits that transformed a stop
sign into a traffic signal.

And fix a few cargo fmt issues
2021-02-12 13:47:10 -08:00
Dustin Carlino
46caf98779 When selecting pedestrians or bicycles, pick the one closer to the cursor. 2021-02-11 15:09:58 -08:00
Dustin Carlino
4c1d610e4f Restore screenshots for Great Kneighton 2021-02-11 15:09:06 -08:00
Dustin Carlino
fd73166292 Prep to import actdev again, and fix build break in game/src/lib 2021-02-11 14:35:32 -08:00
Dustin Carlino
21573e09f1 Delete all of the actdev maps. I'm going to do this over again and just
use the site name as the city, instead of picking the "closest" major
city. This is introducing too much friction in automation.
cyipt/actdev#65

There will be a few awkward results -- cambridge gets renamed, and lcid
gets disassociated from leeds. Worth it for now.
2021-02-11 14:27:28 -08:00
Dustin Carlino
e333838560 If you start with --dev and wind up on an empty map, time starts at 6am. When you load another empty map, do the same and jump to daytime.
There is a little inconsistency still: say you're simulating a scenario
(starting at midnight). If you change the scenario to none, it'll stay
night, but if you then change maps, it'll jump to day.
2021-02-10 14:10:42 -08:00
Dustin Carlino
a5091a4f18 Clean up unused ctx param from SandboxMode::async_new and simple_new 2021-02-10 14:03:06 -08:00
Dustin Carlino
789b300963 Add an about button to the blog gameplay mode. cyipt/actdev#66 2021-02-10 10:48:52 -08:00
Dustin Carlino
b38b7da8bb Add a 'blog' gameplay mode, which disables going back to the title screen, switching maps, etc. cyipt/actdev#66 2021-02-10 09:52:26 -08:00
Dustin Carlino
7c0bac236a Bring in study areas for all actdev sites. Automatically show them when launching in actdev mode. cyipt/actdev#65 2021-02-10 08:35:08 -08:00
Dustin Carlino
3b893302ed Support fractional zoom levels in --cam, like 16.35/51.607943/-1.261117 2021-02-09 19:41:35 -08:00
Dustin Carlino
a6fc030db4 Add a CLI flag 'router' to map actdev site name to the map name. For https://github.com/cyipt/actdev/issues/28 2021-02-09 16:14:34 -08:00
Dustin Carlino
1b1a4e99c7 Adjust procedurally generated building setback. Generate for most of the suburban actdev maps. https://github.com/cyipt/actdev/issues/65 2021-02-09 16:04:40 -08:00
Dustin Carlino
da76c306ea
Apply an initial camera zoom when passing the --cam param. For (#503)
https://github.com/cyipt/actdev/issues/44
2021-02-08 18:12:58 -08:00
Michael Kirk
4b665c871d
update geo related deps. (#508)
geo-types to 0.7
geo to 0.17 which removes redundant old geo used by polylabel
geojson to 0.22
2021-02-08 16:34:56 -08:00
Dustin Carlino
4235d9f994 When importing maps, optionally add in extra buildings from a GeoJSON
source to augment the ones in OSM. For
https://github.com/cyipt/actdev/issues/53 -- sometimes the buildings
just haven't been mapped in OSM yet, other times the buildings are part
of a future development site. In either case, we can procedurally
generate some houses, so this is a way to include them in the map.

Start doing this for Chapelford. But first, adjust the generated house
sizes -- they were WAY too tiny.

Also prep for [rebuild] [release]
2021-02-07 13:56:26 -08:00
Dustin Carlino
06ab55da00 Prune auto-placed buildings that overlap each other. https://github.com/cyipt/actdev/issues/53
And write the result as geojson. This process could become a map
importer phase, but I like checking the intermediate results, and it's
not clear yet how often we'd be using this.
2021-02-07 11:50:30 -08:00
Dustin Carlino
c847207bb8 Prune auto-placed buildings that wind up on top of existing parts of the
map. https://github.com/cyipt/actdev/issues/53
2021-02-07 11:29:02 -08:00
Dustin Carlino
29fb271afc Automatically generate houses along empty residential roads, for https://github.com/cyipt/actdev/issues/53. Still need to prune out houses that hit existing map features, and save the output. 2021-02-07 10:55:16 -08:00
Michael Kirk
3449d49b6d
WebGL 1.0 support, with automatic fallback for Safari/iOS (#504)
#506
2021-02-06 19:04:43 -08:00
Michael Kirk
3a5e63aaff
More helpful loading screen (#496) 2021-02-04 10:35:31 -08:00