Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
Go to file
Michael Kirk 7856671ac6 Fix glow backend on mac
Without this change, the screen was blank when using the glow backend on macos.

Some debugging traced it down to the shader attribute configuration.
@dabreegster suggested trying to declare a newer version of the shader
language which supports the syntax for explicit attribute layout, which
fixed it.

Specifically, before this commit, this diff was interesting on macos:

diff --git a/ezgui/src/backend_glow.rs b/ezgui/src/backend_glow.rs
index 2046bccd..f834a4fa 100644
--- a/ezgui/src/backend_glow.rs
+++ b/ezgui/src/backend_glow.rs
@@ -244,31 +244,7 @@ impl PrerenderInnards {
                 glow::FLOAT,
                 false,
                 stride,
-                // WTF: this offset seems correct, but on macos (OpenGL 4.1)
-                // a blank screen is rendered.
-                //
-                // To debug, I've hardcoded a color assignment in the fragment shader.
-                //
-                // What's fascinating is that, even if we don't use this second "style"
-                // input for anything, the mere act of passing it in with the expected
-                // offset causes all the geometries to not be visible.
-                //
-                // That is:
-                // - with a hardcoded color in the fragment shader
-                // - set offset `0` here (which is surely wrong?)
-                // - I can see the correct shapes with my hardcoded color
-                //
-                // - with a hardcoded color in the fragment shader
-                // - set offset `2*size_of(f32)` here (which should be right)
-                // - I'd expect to see the correct shapes with my hardcoded color
-                // - But instead I can no longer see any shapes on the screen
-                //
-                // So it seems like something about setting the offset on this second attribute
-                // configuration is corrupting our vertex data, even if we never read from that
-                // attribute data.
-                //
-                // 2 * std::mem::size_of::<f32>() as i32,
-                0
+                2 * std::mem::size_of::<f32>() as i32,
             );
2020-08-19 18:54:25 -07:00
.github/workflows Build and publish cargo docs too 2020-08-19 11:33:00 -07:00
abstutil 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
book Make a tool to dump the map in JSON. 2020-08-19 12:49:30 -07:00
convert_osm Handle buildings tagged as parking garages in OSM. 2020-08-19 17:19:54 -07:00
data Prepare to support capping the number of vehicles that can pass through 2020-08-19 17:46:40 -07:00
ezgui Fix glow backend on mac 2020-08-19 18:54:25 -07:00
game New tool to union two scenarios. One use case is manually defining some 2020-08-19 17:49:39 -07:00
geom Fix parking aisle loops that cross the parking lot polygon. Closes #242 2020-08-18 15:12:12 -07:00
headless Get an end-to-end sample experiment working through the API and Python client 2020-08-18 12:52:38 -07:00
importer Regularly import Xi'an 2020-08-17 19:37:34 -07:00
iotool Make a tool to dump the map in JSON. 2020-08-19 12:49:30 -07:00
kml bring in planning area KML for berlin, #119 2020-07-16 11:15:22 -07:00
map_editor And the same thing for OriginalIntersection 2020-08-13 11:48:13 -07:00
map_model Prepare to support capping the number of vehicles that can pass through 2020-08-19 17:46:40 -07:00
release finishing the consolidation of docs 2020-08-10 14:56:39 -07:00
sim New tool to union two scenarios. One use case is manually defining some 2020-08-19 17:49:39 -07:00
updater stop drawing center lines for one-ways. while regenerating maps, also 2020-07-31 20:48:26 -07:00
.gitignore Regularly import Xi'an 2020-08-17 19:37:34 -07:00
Cargo.lock Make a tool to dump the map in JSON. 2020-08-19 12:49:30 -07:00
Cargo.toml Make a tool to dump the map in JSON. 2020-08-19 12:49:30 -07:00
clippy.sh round of clippy. not fixing everything. 2019-12-11 16:17:15 -08:00
format_md.sh finishing the consolidation of docs 2020-08-10 14:56:39 -07:00
import.sh detect the data/ dir more intelligently. fixes #73. still need to 2020-07-07 11:09:35 -07:00
LICENSE Initial import of A/B Street prototype. 2018-03-13 08:06:03 -07:00
README.md new release 2020-08-16 18:53:44 -07:00
rgrep.sh widget replacement keeps margins from the old 2020-07-19 11:28:12 -07:00
rustfmt.toml tweaking rustfmt options; the long literal string vecs in tutorial look awful 2020-01-21 15:20:02 -08:00

A/B Street

Ever been stuck in traffic on a bus, wondering why is there legal street parking instead of a dedicated bus lane? A/B Street is a game exploring how small changes to a city affect the movement of drivers, cyclists, transit users, and pedestrians.

Show, don't tell

Alpha release trailer

Find a problem:

exploring_traffic

Make some changes:

editing_map

Measure the effects:

evaluating_impacts

Documentation

Roadmap and contributing

See the roadmap for current work, including ways to help. If you want to bring this to your city or if you're skilled in design, traffic simulation, data visualization, or civic/government outreach, please contact Dustin Carlino at dabreegster@gmail.com. Follow r/abstreet for weekly updates or @CarlinoDustin for occasional videos of recent progress.

Project mission

If you fix some traffic problem while playing A/B Street, my ultimate goal is for your changes to become a real proposal for adjusting Seattle's infrastructure. A/B Street is of course a game, using a simplified approach to traffic modeling, so city governments still have to evaluate proposals using their existing methods. A/B Street is intended as a conversation starter and tool to communicate ideas with interactive visualizations.

Why not leave city planning to professionals? People are local experts on the small slice of the city they interact with daily -- the one left turn lane that always backs up or a certain set of poorly timed walk signals. Laura Adler writes:

"Only with simple, accessible simulation programs can citizens become active generators of their own urban visions, not just passive recipients of options laid out by government officials."

Existing urban planning software is either proprietary or hard to use. A/B Street strives to be highly accessible, by being a fun, engaging game. See here for more guiding principles.

Credits

Core team:

Others:

Data: