5 ms·
Cities Skylines is very nice for such traffic simulations. https://www.youtube.com/watch?v=yITr127KZtQ https://www.youtube.com/watch?v=yITr127KZtQ (https://new
by albertzeyer 6y ago
Cities Skylines is very nice for such traffic simulations.
https://www.youtube.com/watch?v=yITr127KZtQ https://www.youtube.com/watch?v=yITr127KZtQ (https://news.ycombinator.com/item?id=17182008 https://news.ycombinator.com/item?id=17182008) (https://www.reddit.com/r/CitiesSkylines/comments/7h6zr0/traffic_flow_measured_on_30_different_4way/ https://www.reddit.com/r/CitiesSkylines/comments/7h6zr0/traf...)
https://www.youtube.com/c/BiffaPlaysIndie/search?query=lane+mathematics https://www.youtube.com/c/BiffaPlaysIndie/search?query=lane+...
This is frequently posted here on HN.
E.g. https://news.ycombinator.com/item?id=25632642 https://news.ycombinator.com/item?id=25632642.
- waiseristy 6y agoUnfortunately CS suffers from many "dumb computer tricks". The pathing algorithm is open loop, often causing huge 1 lane jams even though it would be more efficient for through traffic to use other less congested lanes. You end up needing to create crazy unrealistic spaghetti interchanges in order to trick the AI into behaving
- Shared404 6y agoI agree, Computer Science does suffer from many dumb computer tricks. Wait a second. Ah well, point still stands. E: It was a joke...
- sumtechguy 6y agoHaving watched way too many Biffa vids. The way to fix that is to create/force dedicated turning lanes. There is a plugin that lets you manage it. It should be built in. If you do not have the plugin sometimes you can fix it by changing the number of lanes on both sides of an interchange (what biffa calls lane mathematics). Basically if you have 3 lanes merging into 3 you need a 6 lane on the other side. If you have 6 and 3 dumping off you need 3 for both exits. That does not fix 4 way intersections though and usually you need the plugins to fix that.
- waiseristy 6y agoI have tried this method, and it does indeed work (TM:PE is the mod I think you are talking about). But at some point the sims have to change lanes to get into the correct one to turn, unfortunately they wait until the last possible moment to switch, causing huge traffic issues. On top of that the sims still prefer a single lane even if you do the lane mathematics. A 6 lane freeway, splitting to a 2 lane and 4 lane doesn't help when the sims still insist on using 1 of those 2 and 4 lanes.
- robben1234 6y agoTM:PE allows to forbid lane switching close to the intersection forcing them to pick a lane earlier at higher speed and not break the flow. To do so use the yellow+red circles tool, pick a road node and press Shift+S. Repeat until traffic goes smoothly. Demo https://youtu.be/ex2PfNktryk?t=1260 https://youtu.be/ex2PfNktryk?t=1260
- sumtechguy 6y agoThis methods does not always work if the intersections are too close to each other in some small edge cases. You usually just need to space things out more which will in turn tear up part of your city. Another method he uses with that mod is to sometimes not allow changes anywhere on the road. Then he forces them to pick a lane when they cross an intersection that connects to the road. Also along main roads with lots of intersections he has all the feeder roads yield and tells all the intersections to go on through.
- zxcvbn4038 6y agoThis is another thing they do in Washington D.C. that really annoys me. GPS tells me that I need to turn left ahead, no problem I work my way over to the far left lane. However when I get near the intersection it turns out I needed to have turned into parallel side street a quarter mile back. Other times those side streets are really long freeway ramps or turn off before the left turn. Other times they stop traffic at the intersections and you have to turn left across multiple lanes that don’t turn left. It’s a wildcard every time.
- docpytr 6y agoabout the one lane backups, one method that i employ are 3 lane roads, all only lanes and by use of TM:PE, say do not switch lanes for 5 points before intersection, forcing traffic to use all lanes.
- airza 6y agoIn the first video a bunch of cars are crowded in one lane of the double lane road (a problem that plagues much of the traffic in the game)
- brianjunyinchan 6y agoCheck out ABstreet as well on github: https://github.com/dabreegster/abstreet https://github.com/dabreegster/abstreet
- matkoniecz 6y agoA/B Street is much, much more ambitious as far as traffic simulation goes, but still in progress. https://github.com/dabreegster/abstreet#ab-street https://github.com/dabreegster/abstreet#ab-street If someone is looking for interesting Rust project to contribute (also as a beginner) I really recommend it. Author is great, friendly to PRs (what includes PRs made be programmers with no Rust experience).
- imaginenore 6y agoThat looks really cool! I hope they finish it.
- Toutouxc 6y agoBTW the M1 Macs run Cities Skylines beautifully through Rosetta 2. I lowkey wanted to try it for years and now on the M1 Air I can and the game is just amazing.
- edwardwatson 6y agoI have a base spec 2017 iMac and it runs City: Skylines smoothly. It's not a particularly hungry game.
- bstar77 6y agoCity Skylines traffic simulation is mediocre at best. This project is extremely impressive. I sat and watched the traffic simulation for 15 minutes before I realized it.
- tracyhenry 6y agoI don't think traffic in Cities Skylines can count as "nice". I quit playing CS because I spent 80% of the time fixing the traffic. It gets exponentially harder as your city gets bigger. I found myself using extensions to designate lane change rules, set precise traffic light time periods, etc. It was time consuming and the fun was lost. The cars in the demo seem much much smarter. EDIT: typos.
- me_me_me 6y agoHehe, traffic management is really the only challenge in that game. Otherwise its almost a sandbox city builder.
- tracyhenry 6y agoThe challenge I happily took is to grow the city. I'd expect if the layout of resources is not balanced, people will move out. But it turned out people move out because of the traffic??