Hacker News new | ask | show | jobs
by dabreegster 2188 days ago
Hi, author here. Previously posted to HN (https://news.ycombinator.com/item?id=21763636). I just released alpha -- check out this cheesy trailer (https://www.youtube.com/watch?v=LxPD4n_1-LU).

Happy to answer questions! And if you're serious about running this in your city, the importing process has improved greatly since December, so get in touch.

9 comments

Reminds me of the Citybound game in (slow :( ) development by basically one guy and also written in Rust:

https://aeplay.org/citybound

He demoed his actor system with 100 000 cars in the middle of this talk: https://www.youtube.com/watch?v=qr9GTTST_Dk

Maybe you guys should team up :) (if not already...)

Citybound looks awesome, but development seems a bit stalled. I've been in touch on r/citybound before, am following the project closely. There's also https://github.com/Uriopass/Scale, which has a really awesome demo running of Paris
There is also: https://store.steampowered.com/app/1067860/NewCity/ which i've seen with a couple hundred thousand actors.
It's like SimCity for a real city!

I tried the Windows version and some of the UI controls don't respond to mouse clicks, e.g. home and gear button in bottom left, speed controls and dropdown. I noticed the target areas for them are about 90px below where the buttons are painted. So when I click the checkbox to show/hide Bus, it actually turns on and off the one for Car. I'm on v0.2.0b and the client area of my game window (excluding titlebar, edges) is about 2560x1520.

Some elements, like the dropdowns at the top (Sandbox map and traffic setting) work ok.

EDIT: Looks like schemescape beat me to reporting this. I'd love to know if this was just a dumb "programmer-oops" or if there's an opportunity for the language/libraries/framework to better funnel code toward correctness.

I've seen a few interfaces with this issue now, another one being ultimaker cura (might be fixed in a current version) and the occasional game. Every time has been with scaling on, and always seems to move the clickbox down and to the right. Would love to know what causes it.
Minor issue I noticed: whenever I launch the app on Windows, the mouse hit-targeting is off vertically by ~40 pixels. Resizing the window makes the problem go away for the rest of the session. I'm on Windows 10, 1920x1080, and I haven't modified scaling/DPI settings.
Could you give https://github.com/dabreegster/abstreet/suites/828409393/art... a shot? If that URL disappears or you don't want to re-download the whole .zip, just the fixed binary is https://www.dropbox.com/s/j2hh8xrugtsxslc/game.exe?dl=0
That new build did NOT fix the issue for me.

Now that I'm looking more closely, this looks like some sort of initial aspect ratio issue, possibly related to a resize.

The game launches and the window either starts maximized or it maximizes itself. If I restore (un-maximize) and re-maximize, the aspect ratio is clearly different because the logo in the center of the screen gets slightly taller (while staying the same width).

In other words, the initial aspect ratio of the graphics seems incorrect (squished vertically slightly for me, running at 1920x1080).

https://github.com/dabreegster/abstreet/issues/65

Thanks for reporting! I'll try fixing this blind (no Windows machine handy) and send a new build; it'd be great if someone could confirm it.

Have you tried Virtualbox in whatever OS you're using to run a Windows VM?

I believe MS provides premade free virtualbox images for IE testing purposes too.

This sounds suspiciously familiar

Do you have your windows taskbar in non-default position? Mine is on top of screen and some games in some display modes give offset mouse position

It would be awesome to see you model some real changes that the city has made over the last few years, and see how closely the "predictions" made by your model match up with the observed data! The big one is the viaduct closure, but even little changes that you saw in your own experience, like "Bus lane now extends for two more streets," could be really informative.
1) How is assignment actually done? i.e given a trip from O to D, how does the model decide which mode to take and which roads/routes to take?

2) How well does it validate? I couldn't find any reference to observed traffic count data anywhere

1) Mode choice is fixed, coming from https://www.psrc.org/activity-based-travel-model-soundcast. Next work focus will be on adjusting mode choice when edits make it favorable to bike/walk. Route assignment is mentioned in https://dabreegster.github.io/abstreet/how_it_works.html (documenting all assumptions in an organized way has been really hard). There are score functions in https://github.com/dabreegster/abstreet/tree/master/map_mode... -- they're pretty simple right now.

2) I wrote a bit here: https://old.reddit.com/r/urbanplanning/comments/hdylmo/ab_st... In short, validation is hard, and I'd say I'm a bit understaffed.

Kudos for this.

Does this only simulate what would be considered a typical traffic load, or can it simulate outlier events (sport games, concerts, COVID quarantine, etc)?

Only fixed trips coming from https://www.psrc.org/activity-based-travel-model-soundcast. Demand modelling is next -- changes you make to the map will influence existing trips to change mode. The biggest difficulty in simulating outlier events is making a clear UI for specifying that new load.
I wonder what the how far the optimal is from existing for variations of global vs greedy (local) optimization.
Awesome job congratulations this looks it detailled, I can see there is a lot of work behind.
Does this take into account the CHAZ/CHOP?
There's been a small edit war in OpenStreetMap to keep up with the access restriction changes. Right now no, but when I grab fresh new OSM data, some roads will probably just disappear. Need to support no-through-access.