-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shortcut for fixing all round about rules in one click #539
Comments
please assign to me. |
I am thinking that I can write code that auto detects a roundabout when we use priority tool>shift+click |
That will be the hardest part :) |
Random thoughts:
As an example of something that might prove difficult to detect, take this concoction from a city I'm currently making: It started out as two roundabouts (one around the train station, and one around the park) which were merged together, sharing a straight section of road (between park and station). I've since changed some of the road around station to two-way to make traffic more fluid, but the 'oval-about' around the park is still one-way and acts as roundabout. In cases where roundabouts can be detected, it would be good if the segments could be highlighted to give some visual confirmation to user as to which part of their road network will be affected. However, it might also be beneficial to have an option to allow users to define which segments comprise the roundabout. For example, here I've used routes tool to turn the roundabout in to a named route: As for what happens at the junctions:
Possibly related issues: Tagging #472 , #73 , #424 , #41 (comment) |
@krzychu124 @aubergine10 |
@aubergine10
I use a lot of roundabouts with the rules I have suggested so I am certain yeild +enter blocked junctions works just fine in this scenario. :)
I don't think adding traffic lights to roundabout is a good idea. In any case I think you might have misunderstood me. What I intend to do is to shift+click on the round about to setup common traffic rules for a normal roundabout. Why should it add a traffic light? You can of course add traffic light manually using TMPE. TMPE junction restriction tool can allow you to do right turn on red if you like.
In options you can define which one of these rules you like and which one you don't like. I personally don't like changing lanes in roundabout in this game. I don't think cars change more than one lane anyway. Just to be clear I am taking about changing lane on nodes without junctions and two segments with same number of lanes. and I intend to achieve it by using the lane connection tool. |
@aubergine10 Before raising the issue about road segments I need to give this some though. But if you like you can go ahead and do the honors :) Edit: created #542 |
#7 is also related to this |
A bit of progress on the roundabout rules.
My code is here: https://github.com/kianzarrin/TMPE-kian/tree/PriorityRoad |
For these features I may need to modify the traverse function to use one more input and output variable. I wonder how hard is it going to be to write a breadth-first traversal functions that trims path that don't form a loop. |
Its just going to be like breadth first search of binary search tree. I just have too keep pointers to parent. |
Ok I have arrived at a dilemma: What should I do? choose option C which is full proof but not inclusive leaving strange roundabouts to issue #542 ? or choose option A or B that are more inclusive but may suggest strange paths that the user can see by looking at the highlight? I personally prefer option A. But I need other peoples opinions before I can progress with this. |
How about a shortest loop of the same road type. If the user changes road type to a smaller or larger road and breaks the loop, its on them to fix it manually. In your top picture, there is no roundabout with a single road type, so it should not be detected as such. |
@kvakvs |
B makes no sense at all, it extends onto the highway, i do not want highway be modified, if i am only doing a roundabout. Just prefer the same type road. Also maybe you can also query the Game Engine and get the road assigned the same street name somehow. |
We can't add more tabs. Some languages (*cough* German, Polish...) have long words. We already had to simplify tab names to make everything fit so adding another tab is a non-starter IMO. We should instead make tabs scrollable so they can fit more options. (Look at code for mod compatibility checker to see how to do scroll panels). The options depicted ( #539 (comment) ) all look like they belong on Policies tab, in an "At roundabouts:" section maybe? |
Some more thoughts:
|
@aubergine10 I already turn on relavant overlays. if you hold ctrl then relavant overlays are turned on. Also ofcourse the round about is highlighted when holding shift. My code is in github so you can take a look.i upload my latest version tomorrow. |
Wow look at this cool implementation of magic roundabout: and another type of roundabout: https://www.google.co.uk/maps/@51.8845308,0.9327983,122m/data=!3m1!1e3 I will see how my roundabout mass edit feature works out here. |
Still not found the one I'm looking for, but another to test: https://steamcommunity.com/sharedfiles/filedetails/?id=662904182 Lots of very short roads between junctions, will likely cause problems with UI or even the various tools. |
This is the crazy roundabout I was trying to find: https://steamcommunity.com/sharedfiles/filedetails/?id=467233288 |
Sp3ctre18 is doing some interesting roundabout designs which can be found in this collection: https://steamcommunity.com/workshop/filedetails/?id=1762964190 |
@aubergine10 As said in #539 (comment) I prefer to upgrade the roundabout finding algorithm in second phase of this issue (or should I open a new issue?). @brunoais I can see now that there is certainly a demand for it. #542 is an alternative solution to the problem.Regardless I prefer to make the roundabout traversal algorithm more clever. |
@kvakvs Do I need unit tests here? |
@kianzarrin You don't need them to release this work, but if you find a way to test this in some reasonable non-complicated way, absolutely do it. |
@aubergine10 It shouldn't but I'm curious why is this even possible? |
It's what the code does. To avoid it we can check for node onewayout flag |
Well, priority signs are about entrance to junction, not leaving junction. So, specifically, we should ideally disable priority sings on junctions that have one way IN, as that one way in has no competition (and thus no need for priorities to be set). |
Just a random thought: Looking at some of the glitches identified in the test images (great work btw!!) would it be worth having something that classifies as segment as "clockwise, anti-clockwise, or bidirectional"? That way, if the starting segment is clockwise travel direction (such as roundabout on LHT cities), for example, it would make it easier to filter adjacent segments if, in relation to previous segment, they are going clockwise. If starting segment is bi-directional, then pick a direction relevant to city setup: LHT = clockwise, RHT = anti-clockwise, and follow that curve? Rough mockup: based on direction of traffic (on current segment) entering a node, and knowing if clockwise vs. anti-clockwise, could something like this work? Example above would be for clockwise travel. So one line is "straight ahead", the other is at some angle of tolerance, and any outgoing segment in between would be considered candidate for "continuation of the road in the (anti)clockwise direction". |
I can't see how to implement the clockwise direction thing since the code is not aware of the bigger picture when its focusing on one segment. I have some simple ideas to fix it
|
people use a lot of roundabouts in their cities. the vanilla roundabout can get a massive boost if pimped by traffic manager. while the roundabout mod automatically adds TMPE rules when creating them, I still want to be able to add traffic rules after creating roundabouts for example because I might modify my roundabout or I am trying to fix other peoples cities.
I am planning to add a simple shortcut to fix all the traffic rules for a roundabout with one click.
I prefer to avoid adding a roundabout tool to traffic manager. I think its best to use the already existing junction priority tool. select the tool and then press alt+shift+click on a round about to do all of the following:
I also wish to add options so that people can individually choose any of these features.
The text was updated successfully, but these errors were encountered: