7856671ac6
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, ); |
||
---|---|---|
.github/workflows | ||
abstutil | ||
book | ||
convert_osm | ||
data | ||
ezgui | ||
game | ||
geom | ||
headless | ||
importer | ||
iotool | ||
kml | ||
map_editor | ||
map_model | ||
release | ||
sim | ||
updater | ||
.gitignore | ||
Cargo.lock | ||
Cargo.toml | ||
clippy.sh | ||
format_md.sh | ||
import.sh | ||
LICENSE | ||
README.md | ||
rgrep.sh | ||
rustfmt.toml |
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.
- Play on Windows, Mac, Linux, FreeBSD, or read all instructions (new releases every Sunday)
- build from source (new changes daily)
Show, don't tell
Find a problem:
Make some changes:
Measure the effects:
Documentation
- How A/B Street works
- Technical
- Presentations
- April 2020 Rust meetup: recording, slides
- Feb 2020 traffic sim
- Oct 2019 Traffic sim and current challenges
- Oct 2019 Map construction
- Project
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:
- Dustin Carlino (dabreegster@gmail.com)
- Yuwen Li (UX)
Others:
- All contributors
- Logo by Ryan Pierson
- Graphic design advice from Starcat Games, Daniel Huffman, Brian Prince
- Character art by Holly Hansel
- Lightning-fast pathfinding thanks to fast_paths by Andreas Barth (easbar.mail@posteo.net)
- Hackathon drop-ins from Democracy Lab events
- CUGOS and Julian Michael have been great sounding boards for ideas since the beginning
- In-game character faces adapted from Anokhee Jandhyala
- Pandemic modeling by Orestis Malaspinas (orestis.malaspinas@hesge.ch)
- Game design advice from Christopher Klein
- OSM expertise courtesy Mateusz Konieczny
- Lots of helpful PRs from Javed Nissar and Michael Kirk
- Lots of help with rendering SVG and fonts from RazrFalcon and nical
Data:
- Special thanks to all OpenStreetMap contributors!
- King County GIS
- Seattle Open Data
- Puget Sound Regional Council