jamespetts / simutrans-extended

Sources for the Experimental branch of the popular game Simutrans
http://forum.simutrans.com/index.php?board=53.0
Other
81 stars 52 forks source link

[Feature request] Make trucks not enter occupied intersections. #627

Open martin509 opened 9 months ago

martin509 commented 9 months ago

In real life, if I am at an intersection and can see that there is a car just across the intersection from me, I am supposed to not go forwards because this would block traffic going the other way. In Simutrans Extended, if I am a bus driver in a dense city heading towards a central station with another two dozen convoys, I will gladly park my bus directly in the middle of an intersection, causing severe gridlock that is hard to counteract except through very careful design of routes to not dump buses into one area. image If I, the player, want to have some form of countermeasure against this, I have to wait until like 1960 when programmable traffic lights become available. While that's handy and all, it would be nice to have something short of that, like a tweak to convoy behavior that prevents them from occupying intersections (e.g., 'do not enter an intersection unless the space you have reserved is empty').

jamespetts commented 9 months ago

Hello! Thank you for your feedback.

Resources available for coding new features is currently extremely limited. I am the only person currently actively working on the project, and (1) I currently have very little time to do so because of various other commitments; and (2) there is an enormous queue of higher priority work that needs to be done first.

However, if you would like to code an improvement to road vehicle behaviour at intersections, then do feel free to have a go.

Incidentally, traffic lights should be available from the 1920s in Pak128.Britain-Ex, which it appears that you are playing.

martin509 commented 9 months ago

I see, thank you. I am totally unfamiliar with this game's code but figure I may give it a shot. Oddly enough I couldn't find traffic lights in a starting game until I started at 1960, but I may have just missed something.

jamespetts commented 9 months ago

Do have a go! I should be interested to see what you can come up with.

Incidentally, do check earlier games for traffic lights. Can I check that you are using the latest version of Pak128.Britain-Ex?

martin509 commented 9 months ago

Version is nightly build 14.21 #b7ff4ac from November 22nd, so reasonably current. I just started a game in 1930 and the traffic lights were right there, so I was just mistaken, whoops. Anyways, if I'm able to figure out the AI code enough to get a working addition to the code, I'll make a PR.