Nice work. I'm wondering since this project seems to use its own nicely modularized GUI library, what motivated you in particular to write your own instead of using an existing Rust GUI library/game engine ? And would you make the same decision if you started now (vs 2 years ago) ?
Abstreet: Traffic simulation game written in Rust
31–40 of 77 posts
Re: Abstreet: Traffic simulation game written in Rust
#32I'm looking for 3D or 2D graphics libraries that are good for prototyping stuff in Rust.
Re: Abstreet: Traffic simulation game written in Rust
#33Re: Abstreet: Traffic simulation game written in Rust
#34This is pretty cool! One thing that bothers me about every traffic simulation I've ever seen, though: all of the vehicles and pedestrians here seem to be obeying the law. That's just not realistic -- especially on Mercer, which is blocked (both directions) every few minutes in rush hour by some jerk trying to make an illegal turn onto a packed street. I'd say the main causes of traffic blockages that I encounter duri…
Right now, it's hard to get a full day of simulation to complete at all, because vehicles gridlock on really short roads inferred from OSM. Once a realistic amount of traffic can get through at all, then I'd love to simulate some percentage of illegal behavior.
Re: Abstreet: Traffic simulation game written in Rust
#35I swear I was discussing exactly this sort of simulation with my brother as both of us wondered how many city planners model the changes they are making to the road networks before pumping millions into projects that dump traffic from one point to another. Additionally, it'd be interesting to simulate the cascading effect of traffic violations like bad parkings, straddling lanes. Kudos to Dustin for working on this.
See AIMSUN Linsig Paramics VISSIM For examples of commonly used traffic modelling packages More high level strategic modelling is often done in Cube
Re: Abstreet: Traffic simulation game written in Rust
#36This is pretty cool! One thing that bothers me about every traffic simulation I've ever seen, though: all of the vehicles and pedestrians here seem to be obeying the law. That's just not realistic -- especially on Mercer, which is blocked (both directions) every few minutes in rush hour by some jerk trying to make an illegal turn onto a packed street. I'd say the main causes of traffic blockages that I encounter duri…
The principle one is entering an intersection that they don't have room to leave, so they're still there when the signal changes and block the cross direction. (Is this AKA blocking the box? That sounds like a regional term.) This is needed to induce most forms of gridlock.
I'd love if it had more support for jaywalking and vehicles stopping in travel lanes with their flashers on. (And then I'd love if I had a lightning-bolt tool where I could just smite them from on high. There probably is a mod for that, actually.)
Re: Abstreet: Traffic simulation game written in Rust
#37Looking to learn rust. Anybody know how/what library was used to build those graphics? I'm looking for 3D or 2D graphics libraries that are good for prototyping stuff in Rust.
For 2D I'd recommend ggez, it's easily the simplest and most polished rust game toolkit.
There's a good wrapper for SDL2, but I forget which one it is.
wgpu-rs is a really cool next-gen-but-easier-to-use cross platform graphics API. It's early days though so you have to be willing to do some legwork.
Amethyst is taking a shot at a Godot or Unity style modern integrated game engine. It'll be a while before they get to that level but it's still useful and reasonably well documented.
Re: Abstreet: Traffic simulation game written in Rust
#38Earlier quoted context omitted.
See AIMSUN Linsig Paramics VISSIM For examples of commonly used traffic modelling packages More high level strategic modelling is often done in Cube
The professional simulators are prohibitively expensive for individuals to play around with, sadly. I had the chance to try VISSIM recently, and the UI was overwhelming -- the general public would never casually learn to use something that intricate. I'm trying to strike a balance between the heavy-duty simulation packages and existing city sim games -- something with a good approximation of a real city by default, a…
Re: Abstreet: Traffic simulation game written in Rust
#39Hi, author here! Didn't intend for this to wind up on HN quite yet, but I'm excited to answer the good questions coming up here.
We certainly don’t deserve you though, you’ve seen how we drive
Re: Abstreet: Traffic simulation game written in Rust
#40This is pretty cool! One thing that bothers me about every traffic simulation I've ever seen, though: all of the vehicles and pedestrians here seem to be obeying the law. That's just not realistic -- especially on Mercer, which is blocked (both directions) every few minutes in rush hour by some jerk trying to make an illegal turn onto a packed street. I'd say the main causes of traffic blockages that I encounter duri…
I've had a lot of fun tweaking this setting in Cities:Skylines. There's a user-written mod called Traffic Manager Presidential Edition which lets you enable some (but not all) bad behaviors. The principle one is entering an intersection that they don't have room to leave, so they're still there when the signal changes and block the cross direction. (Is this AKA blocking the box? That sounds like a regional term.) Thi…
[0] https://tmpe.viathinksoft.com/wiki/index.php?title=Reckless_...