News for hackers. Stuff that matters.
Re:Traffic Simulator by waiseristy on Thursday January 07, 2021 @01:52PM (#25675433)
Unfortunately 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
Re:Traffic Simulator by sumtechguy on Thursday January 07, 2021 @04:00PM (#25677397)
Having 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.
Re:Traffic Simulator by waiseristy on Thursday January 07, 2021 @06:36PM (#25679198)
I 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.
Re:Traffic Simulator by robben1234 on Friday January 08, 2021 @08:46AM (#25684648)
TM: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

Re:Traffic Simulator by zxcvbn4038 on Friday January 08, 2021 @09:08AM (#25684857)
This 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.
Re:Traffic Simulator by sumtechguy on Friday January 08, 2021 @08:59AM (#25684759)
This 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.

Re:Traffic Simulator by waiseristy on Friday January 08, 2021 @02:02PM (#25688613)
Oh yeah! That is usually what I end up doing, but even as you forbid lane switching on the nodes preceding the turn, the sims still will all switch lanes at the node closest to the turn which does not have lane switching forbidden. Causing the backup to happen, not at the exit, but 3-4 nodes before the exit! Lol, I don't know how to solve it
Re:Traffic Simulator by sumtechguy on Friday January 08, 2021 @02:30PM (#25689101)
A good way to handle that is to make sure they pick their lane at the start of the road (if you can). You do that by having no lane switching except at entrance intersection. Does not always work but does sometimes. Another trick he has used sometimes is 2 lane picking. Basically you can only 1 lane at a time. The thing will sometimes get confused and try cutting across 3 lanes of traffic holding up all 3 lanes. He usually stacks 2-3 of the 1 lane switches after each other and that sometimes clears it up.
Re:Traffic Simulator by Shared404 on Thursday January 07, 2021 @03:29PM (#25676965)
I agree, Computer Science does suffer from many dumb computer tricks.

Wait a second. Ah well, point still stands.

E: It was a joke...

Re:Traffic Simulator by docpytr on Friday January 08, 2021 @05:20PM (#25691287)
about 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.
Re:Traffic Simulator by matkoniecz on Thursday January 07, 2021 @03:22PM (#25676853)
A/B Street is much, much more ambitious as far as traffic simulation goes, but still in progress.

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).

Re:Traffic Simulator by imaginenore on Thursday January 07, 2021 @04:08PM (#25677499)
That looks really cool! I hope they finish it.
Re:Traffic Simulator by tracyhenry on Thursday January 07, 2021 @07:45PM (#25679795)
I 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.

Re:Traffic Simulator by me_me_me on Tuesday January 12, 2021 @08:57AM (#25746911)
Hehe, traffic management is really the only challenge in that game. Otherwise its almost a sandbox city builder.
Re:Traffic Simulator by tracyhenry on Wednesday January 13, 2021 @06:16PM (#25769356)
The 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??
Re:Traffic Simulator by brianjunyinchan on Thursday January 07, 2021 @03:20PM (#25676824)
Check out ABstreet as well on github:

https://github.com/dabreegster/abstreet

Re:Traffic Simulator by Toutouxc on Thursday January 07, 2021 @03:53PM (#25677316)
BTW 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.
Re:Traffic Simulator by edwardwatson on Sunday January 10, 2021 @03:33AM (#25712358)
I have a base spec 2017 iMac and it runs City: Skylines smoothly. It's not a particularly hungry game.
Re:Traffic Simulator by bstar77 on Thursday January 07, 2021 @04:03PM (#25677433)
City 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.
Re:Traffic Simulator by airza on Thursday January 07, 2021 @02:45PM (#25676234)
In 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)