Realistic heavy traffic in big cities

Post Reply
User avatar
brainiac
Posts: 184
Joined: 09 Jul 2016 21:43
Location: Belgrade

Realistic heavy traffic in big cities

#1 Post by brainiac » 17 Oct 2021 19:35

Hello!

It has been a long time I wasn't playing the game. Last time (more than a year ago) I found out that spawn frequency is the best possible, but the problem is that traffic is spawning only at a certain distance from the player. And I found the solution for which I believe is very easy to program (I am a programmer myself). These are parameters:
spawn_distance_forward: (a number)
spawn_distance_backward: (a number)
This will solve everything:
spawn_distance_forward[0]: (a number)
spawn_distance_backward[0]: (a number)
spawn_distance_forward[1]: (a number)
spawn_distance_backward[1]: (a number)
spawn_distance_forward[2]: (a number)
spawn_distance_backward[2]: (a number)
etc.

With current settings, I am very satisfied with traffic density on small roads because all those vehicles which spawn on the "spawn_distance_forward" distance must stop or slow down somewhere, e.g. crossroad or curve.
But, on the freeway, those vehicles don't have any obstacle which will force them to slow down and make traffic jam, like in Los Angeles. So, if I add another spawn point further, vehicles that spawn at "spawn_distance_forward[0]" distance must slow down to not hit vehicles spawned at "spawn_distance_forward[1]" distance. That still doesn't guarantee traffic jams, but if I add 3rd and 4th spawn points, there is no way to avoid congestion.

So can you guys, please, do this little correction?
Working on San Diego map, 2:5 scale: viewtopic.php?f=194&t=258124
I NEED HELP for:
- landscape
- details
- signage and
- company advisors (which companies to put where)
User avatar
bobgrey1997
Posts: 3641
Joined: 30 Nov 2015 02:13
Location: Minnesota, Iowa, Dekotas, and Nebraska
Contact:

Re: Realistic heavy traffic in big cities

#2 Post by bobgrey1997 » 17 Oct 2021 20:34

I don't get it, you want to add more traffic in front of the traffic to force the traffic to slow down? Wouldn't they all just take off at the same time and match speed and distance with each other instead of just stopping?
I think to cause more traffic in cities, we need more traffic to spawn at the same points both in front and behind us, as well as have more traffic spawn on side roads that are connected to the freeway. All of this traffic trying to get on and off the freeway will cause some congestion.
rookie31st
Posts: 533
Joined: 04 Jan 2016 18:09
Location: United States
Contact:

Re: Realistic heavy traffic in big cities

#3 Post by rookie31st » 18 Oct 2021 16:56

Realistic traffic would include spawn variation by time of day as well. Morning and evening rush hours. Midday mild congestion.
Have a mature suggestion to improve American Truck Simulator? Fahgettaboudit!
User avatar
brainiac
Posts: 184
Joined: 09 Jul 2016 21:43
Location: Belgrade

Re: Realistic heavy traffic in big cities

#4 Post by brainiac » 19 Oct 2021 08:28

bobgrey1997 wrote: 17 Oct 2021 20:34 I don't get it, you want to add more traffic in front of the traffic to force the traffic to slow down? Wouldn't they all just take off at the same time and match speed and distance with each other instead of just stopping?
I tried it and it doesn't work. In real life, yes, but not in the game. In real life, traffic needs to enter the freeway for some time to cause congestion. In-game, you have less than a minute to pass each entrance, which is definitely not enough time to make congestion on that way.
My idea existed before the 1.26 version of the game, which works 100%. With 2 spawn points, you may be right, but with adding 2 more spawn points ahead of the player (total 4), too many cars will spawn, new spawn cars have lower speed (especially important 2 middle spawn points), so cars spawned behind can't avoid to slow down.
bobgrey1997 wrote: 17 Oct 2021 20:34 I think to cause more traffic in cities, we need more traffic to spawn at the same points both in front and behind us, as well as have more traffic spawn on side roads that are connected to the freeway. All of this traffic trying to get on and off the freeway will cause some congestion.
The current spawn rate is the best possible. Cars spawn so fast (g_traffic 10, even without Brutal traffic from Kass) that you can't find the gap between two cars. But all those cars speed up and go away...

That is about freeways. The problem with city streets is different: Cars spawn on too few points so there is traffic only on certain streets sections. To represent the real city, there would need to be much more spawn points, so there is traffic everywhere. That would also be achieved with my suggestion.
Of course, that is not the case in most SCS cities because traffic spawn in front and behind you fills all streets (there are only a few streets), unlike my map.
rookie31st wrote: 18 Oct 2021 16:56 Realistic traffic would include spawn variation by time of day as well. Morning and evening rush hours. Midday mild congestion.
That is not really important. The main problem is to be able to make congestion. When you make it, it is really easy to keep it only during rush hour.
Working on San Diego map, 2:5 scale: viewtopic.php?f=194&t=258124
I NEED HELP for:
- landscape
- details
- signage and
- company advisors (which companies to put where)
wato
Posts: 255
Joined: 06 Jul 2020 11:24
Location: Switzerland

Re: Realistic heavy traffic in big cities

#5 Post by wato » 19 Oct 2021 09:34

Personally, I tried different traffic mods and also an increased traffic factor in the config. However, I settled with a simple one-liner mod that increases the maximum amount of concurrent AI in traffic.sii (careful, it can tank performance if set too high). This gave me the best variation between crowded and empty streets, without interfering with train or other rare vehicle spawn ratios, and with the default behavior settings, which I prefer over most of the traffic mods I tried.
I believe, it achieves to a degree what you're after, @brainiac, namely giving cities the chance to "fill up" with traffic from time to time.
User avatar
brainiac
Posts: 184
Joined: 09 Jul 2016 21:43
Location: Belgrade

Re: Realistic heavy traffic in big cities

#6 Post by brainiac » 19 Oct 2021 13:51

If we are talking about the SCS map, yes, cities are filled, but freeways always have a free flow, which is not realistic and what I want.
And, when I try my map, streets are not filled because they are wide, there are a ton of them, but also the distance between crossroads are much bigger than on the SCS map.
Trust me, I tried many different settings and can't fill them.
Working on San Diego map, 2:5 scale: viewtopic.php?f=194&t=258124
I NEED HELP for:
- landscape
- details
- signage and
- company advisors (which companies to put where)
User avatar
bobgrey1997
Posts: 3641
Joined: 30 Nov 2015 02:13
Location: Minnesota, Iowa, Dekotas, and Nebraska
Contact:

Re: Realistic heavy traffic in big cities

#7 Post by bobgrey1997 » 19 Oct 2021 17:44

Wait a minute...
You are suggesting SCS add a new feature that they wouldn't even use in their own map, but instead would be used in larger scale maps?
wato
Posts: 255
Joined: 06 Jul 2020 11:24
Location: Switzerland

Re: Realistic heavy traffic in big cities

#8 Post by wato » 19 Oct 2021 18:34

brainiac wrote: 19 Oct 2021 13:51 but freeways always have a free flow
Not true, with my mod sometimes there are backups, e. g., south of Denver on I25 or at merges, construction sites.

Not sure if I didn't read carefully, but that you're working on a different map is kind of important context...
User avatar
brainiac
Posts: 184
Joined: 09 Jul 2016 21:43
Location: Belgrade

Re: Realistic heavy traffic in big cities

#9 Post by brainiac » 19 Oct 2021 21:37

wato wrote: 19 Oct 2021 18:34
brainiac wrote: 19 Oct 2021 13:51 but freeways always have a free flow
Not true, with my mod sometimes there are backups, e. g., south of Denver on I25 or at merges, construction sites.

Not sure if I didn't read carefully, but that you're working on a different map is kind of important context...
Can you share that mod? If it makes backups at merges, it is realistic.
Here is what was happening in 1.25:
Spawn frequency was also the best possible. One of the symptoms is that you couldn't enter or cross the main street without semaphores, so I made Better traffic flow mods to fix that on all maps I used.
There were so many vehicles in front of me on the freeways. Even where was not any freeway entrance, the slowdown was occurring due to changing lanes I guess (that is the only possible reason). But that was happening far so I couldn't see what is going on. All I could see is that traffic suddenly completely stop. Sometimes it lasts shorter, sometimes really long.
The cause isn't really important, but the final result. You can't mimic real-life slowdown reasons because, in real life, slowdowns occur during longer time intervals than you have in-game. You drive on the freeway very fast and certain road sections appear and disappear in few minutes, even faster, so I must find another way to make slowdown. One guarantee way is what I described in 1st post. Too many vehicles can't drive fast.
When I saw the Brutal traffic mod by Kass, I decided to test it on a long drive. All way through Portland and east on I 84 was really many vehicles in front of me, but traffic never slowed down, except on lane merges. So, until developers add multiple spawn points, I need to find a way to slow down all that traffic. One thing that came to my mind is to make vehicles change lanes more frequently. Do you have any idea?

Now I want to get back to streets in my Los Angeles and San Diego map. The distance between 2 crossroads is usually larger than the traffic removal distance. That means that vehicles mostly spawn only ahead of me in both directions. I usually see a lot of traffic in the opposite direction and behind me, but that doesn't help really, because all traffic which spawns ahead of me while I am waiting on red light disappears because next crossroad isn't loaded because it is too far. So, the only solution I can see here is to make multiple spawn points ahead of me, so traffic doesn't just drive away but stays ahead of me until I pass the crossroad.
Working on San Diego map, 2:5 scale: viewtopic.php?f=194&t=258124
I NEED HELP for:
- landscape
- details
- signage and
- company advisors (which companies to put where)
Optional Features
Posts: 4784
Joined: 26 Sep 2019 20:14

Re: Realistic heavy traffic in big cities

#10 Post by Optional Features » 20 Oct 2021 05:02

I really hope you figure this out: I find it simply incredible that a truck simulator does not have a default traffic config that causes rush hour on big city freeways (and not complete gridlock on city streets at the same time).

Salt Lake to me is a particular annoyance: it's probably the best large city in terms of highways, but it feels so empty regardless of when I drive through.

This is what I want to see in-game, and I've only experienced it like once or twice with a detour. 99% of the time it's just driving on quiet highways with no challenge whatsoever.
[ external image ]
Post Reply

Return to “Feature Wishlist and Suggestions”

Who is online

Users browsing this forum: No registered users and 2 guests