Transport Fever 2

Transport Fever 2

View Stats:
karel2501 Nov 10, 2020 @ 5:36am
Vehicle A.I. and traffic management
So, I've spend quite some time on this game, and while I love it for the most part, the one thing that ultimately makes me so frustrated I eventually abandon it is traffic - or to be more specific, lack of traffic management options and absolutely horrendeous car A.I. Later game in maps with multiple close cities become a traffic management NIGHTMARE that does not seem to have much of a logical or elegant solution. Especially once your cities start to gro so big they form conurbations, traffic jamps with essentially cripple the game.

So I would like to break this problem down, and perhaps discuss some options or solutions.

Problem number 1:
You can't ban a left turn, even on highway ramps. It's simply not possible.

Problem number 2: the vehicle A.I. is abhorent, actually even worse than in C:S.
I can understand that the vehicles will not adjust their path based on traffic density, but I can't deal with the fact that they have NO instructions to prioritize highway-class roads when possible. It seems that literally the only criterium for the path-finding is "distance / max speed of the roads used", which highways having not NEARLY high enough speed advantage over regular streets to compel the drivers to take advantages of overpasses or circuits - they will routinely chose the shorter road even though that inevitably leads them straight into the most congested areas.

Problem number 3: No zipping, no right hand rule seem to be obeyed.

These three issues result in high-way management being literally impossible. You can't make highway exit ramps that would fluently merge into the traffic bellow, because you can't ban car taking a left turn at the merger, and the cars will always take the shorter path, meaning at least one lane of the exit ramp will be congested by cars waiting for the traffic to allow them to take the damn left turn, even though just sticking to the highway for another 50 meters and then taking the other exit would allow them to keep to right-turns only and merge into traffic much more smoothly.

Also, cars often won't even take advantage of the highway shortcuts between segments of the city because they are by necessity slightly longer, even if in reality the fact that they they allow far more more fluent traffic.

Then, the lack of basic zipping principles and lack of rule of right results in mergers even when the car's aren't taking left THROUGH the traffic way slower than it should be.

And finally, cars are prone to change lanes on highways, and in order to do so, they are more than happy to STOP DEAD in the fast lane of the highway and wait for an opening, creating massive, insane jams held by a single dumb car stopping dead waiting for an opening in the left lane. Which of course will take for ever because the exist ramps don't work as they should, creating congestion on the highway itself, and cars simply can't zip and switch lanes fluently.

I understand that TF2 is already quite a complex and hardware very, VERY intensive game. And that there is very limited space for the vehicle A.I. to behave more complexly than it should.

But I think at least two basic, SIMPLE changes really, really critically NEED to be done.

1) let the player define which lane allows which turn. Just let me ban left turns when ever I need to, that will fix like 40% of the issues with the traffic. PLEASE. This can't be hard to implement.
2) hardcode preference for taking a highway when possible, or ballance out the path-finding / defined highway speed in such a way that cars will prioritize somewhat longer, but ultimatelly really faster overpasses and shortcuts. Just do anything it takes to make the cars actually prefer high-ways whenever possible.

The rest, I'm not sure if can be easily solved. The lack of zipping, at least, could be compensated by faster despawn rate of any vehicle that isn't in motion, so that cars waiting to switch lines in dense traffic don't hold up an entire damn line of a highway.

Seriously, of all the things, I think basic road vehicle A.I. is by ABSOLUTE FAR the most glarring issue of this game, even more severe than the performance issues. Could we get some kind of acknowledgement that improvements to this dimension are coming, or at least being actively considered?
And for the rest of you, any ideas for how to improve the state of the traffic management in a realistic way?

With best regards, to the devs and members of the community alike, and best of luck in these trying times.
< >
Showing 1-15 of 17 comments
lollus Nov 10, 2020 @ 7:06am 
I agree. Lane-specific waypoints are sorely missing, too, and bus lanes will crash the game if a mod bans buses in them. This may sound right, but it's not: bus lanes are, in fact, lanes for any company vehicle.
lost Nov 10, 2020 @ 7:08am 
Also fixing whatever causes vehicles to stop dead for no reason on straight roads with no intersection and then (slowly) start going again would help immensely.

Perhaps also being able to ban lane changes at certain node points could help.

And, finally, being able to build ramps at a narrow angle would be helpful combined with the abilith to control lane directions at intersections.

Perhaps also having left turning traffic yield to oncoming traffic as an option, too. The way traffic currently works slows things down far more than one might expect compared to traffic norms at least in North America.
rkelly17 Nov 10, 2020 @ 12:47pm 
Is there any possibility for a mod like Traffic Manager: President's Edition in Cities Skylines? Or is the traffic behavior beyond a modder's reach deep in the program?
karel2501 Nov 10, 2020 @ 10:12pm 
Originally posted by rkelly17:
Is there any possibility for a mod like Traffic Manager: President's Edition in Cities Skylines? Or is the traffic behavior beyond a modder's reach deep in the program?
Unfortunately, I'm pretty sure there isn't one at the moment, it seems to be outside of the possibility of what the current Lua scripting allows for. There are some pretty indepth road management tools out there, but not a single one that would allow for this, even though it is rather obviously the biggest flaw of the traffic management in general. I think we need the dev to help out here. I should not be hard to implement, it's just not something the modding options accounted for.
busrider Nov 11, 2020 @ 5:53am 
when cities grow larger, traffic intensity is very high and always cause traffic congestion, i think some linking roads can build 5 lanes road to solve some extent problem but in the city, traffic congestion is still serious. I think traffic load/ pattern are needed to adjust, citizens are more willing to travel by transport rather than private car, road management (lane direction or arrow) can be added. (I know that this game is focus on transport development rather than city development so city buildings or road management function may not focus in this game)
karel2501 Nov 11, 2020 @ 8:41am 
I don't think extra lane roads would really solve the issue, as the issue is largely in how the A.I. uses them, rather than anything else. And I don't mind some degree of congestion within larger cities, that is natural. Having every road to your conurbation jammed with 10+ km traffic jams despite all of them being highways leading to a massive highway overpass through the city connecting all the most high-density areas, and having properly set up junctions and exit's: that really is my issue.
My problem, at core, is not the fact that jams form, but rather the lack of efficient tools to at least compensate or aleviate for these. Having city-centre congested: yeah, that's going to happen, especially if the "city centre" is a merger of three formerly separate towns. But having traffic jams in places I've clearly solved and improved, seeing my highways either jammed because idiotic exit A.I., or seeing them not being used at all despite there being insane traffic on the ground that should benefit from them - that is frustrating beyond measure.

As I said: I think at least two basic changes would make a world of difference.
Option to ban left turn at certain junctions, and cars prioritizing highways when available.

Much more could be done, but at least these two seem to be easily implemented and would fix about 60% of our problems.
joeball123 Nov 11, 2020 @ 9:04am 
There actually is a way to ban left turns in the game, but it's a bit of a kludge - you turn the road into a dual carriageway around the junction where you want to ban left turns.
karel2501 Nov 11, 2020 @ 11:02am 
Originally posted by joeball123:
There actually is a way to ban left turns in the game, but it's a bit of a kludge - you turn the road into a dual carriageway around the junction where you want to ban left turns.
I'm aware of that option, but it introduces more problems, as the vehicles will oftem merge into the road correctly, but the moment the two one-way streets merge together, they will once again attempt to turn left and just move the jam another few meters down the line. Plus, as you say, it's needlessly clunky.
karel2501 Nov 15, 2020 @ 1:09am 
Actually, I've thought this over and realized there is still one even simpler feature that could be introduced to make the traffic manageable. Simple option to customize traffic density. Just let me decide if the game spawns 1 out of 2, 1 out of 5 etc... vehicles than normal. That, and an option to despawn all existing traffic would be incredibly helpful.
busrider Nov 15, 2020 @ 10:16am 
traffic management and problem is quite serious in this game, cars choose same way to a place, same lane to a road, as a result traffic congestion occurs, building 6 lanes road cannot solve directly, i hope that the game can improve it. Besides, road direction/ arrow (turn left/right/ straight ) cannot be changed, this is a problem also.
Wandering Mania Nov 15, 2020 @ 8:57pm 
Yeah I really wish you could fix things like this from happening:
https://steamcommunity.com/sharedfiles/filedetails/?id=2288894846
Vimpster Nov 15, 2020 @ 10:52pm 
Originally posted by Wandering Mania:
Yeah I really wish you could fix things like this from happening:
I wonder if the fact that you are using a modded road has anything to do with it. Curiously I don't even see any tram track along that route into the station so I don't know how it is even routeing a tram through there at all.
karel2501 Nov 16, 2020 @ 12:08am 
I think the A.I. routing itself is a bit too big of a target to fix. Look at C:S and how that game struggles with making it's traffic A.I. even remotely reasonable for decade. The biggest limitation in A.I. routing is going to be always performance, and TF2's performance is already as stretched as it can be.
So I'm trying to focus on what can be done realistically without major effect of performance. The A.I. and pathfinding is weak - sure. But at least for now, I think the question should always be "How to manage that" rather than how to completely rewrite it.

So far, having option to adjust vehicle spawning frequency (e.g. civil traffic density), adjust de-spawn timers and conditions (make vehicles stuck in a jam despawn faster), increase priority of highway-class roads when path-finding, and most importantly, giving player the tools to ban left/right turns at junctions seem like the least hardware and general work-load work-arounds.

I was also wondering if the lack of zipping ability could be compensated by adjustments to colision boxes. The vehicles are already allowed to clip into each other at junctions to a degree. But I am not sure if that is a viable option.
lollus Nov 16, 2020 @ 6:31am 
Originally posted by Wandering Mania:
Yeah I really wish you could fix things like this from happening:
https://steamcommunity.com/sharedfiles/filedetails/?id=2288894846
The trouble is the piece of road at the centre (the one where the white paths cross), which bars right turns. It is a game error and I have seen it quite often. Does it still happen if you add a bus lane to it? And maybe to the preceding road chunk? That normally allows turning in every direction.
Last edited by lollus; Nov 16, 2020 @ 6:33am
Wandering Mania Nov 16, 2020 @ 7:02am 
Originally posted by Vimpster:
Originally posted by Wandering Mania:
Yeah I really wish you could fix things like this from happening:
I wonder if the fact that you are using a modded road has anything to do with it. Curiously I don't even see any tram track along that route into the station so I don't know how it is even routeing a tram through there at all.
Nope, just vanilla roads. I have mod added vehicles, that map, and a lot of other things. But the roads is the only thing that I have not added any mods for. Even that map uses vanilla roads.

Originally posted by lollus:
Originally posted by Wandering Mania:
Yeah I really wish you could fix things like this from happening:
https://steamcommunity.com/sharedfiles/filedetails/?id=2288894846
The trouble is the piece of road at the centre (the one where the white paths cross), which bars right turns. It is a game error and I have seen it quite often. Does it still happen if you add a bus lane to it? And maybe to the preceding road chunk? That normally allows turning in every direction.
Well see the trouble with that is; If I add a bus lane (which I actually removed) they stay on the tram track. And I was trying to keep them off of that, and out of the way of the trams. But that lane dose have turning both ways. So I don't see why they have to do that. It's just the 'Artificial Idiot' path finding that was a lot better in TF1, and somehow it was made worse in TF2.
< >
Showing 1-15 of 17 comments
Per page: 1530 50

Date Posted: Nov 10, 2020 @ 5:36am
Posts: 17