Skip to content
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

lane connector is buggy for bidirectional lanes #784

Closed
Tracked by #1479
kianzarrin opened this issue Mar 10, 2020 · 6 comments · Fixed by #1211
Closed
Tracked by #1479

lane connector is buggy for bidirectional lanes #784

kianzarrin opened this issue Mar 10, 2020 · 6 comments · Fixed by #1211
Labels
BUG Defect detected LANE ROUTING Feature: Lane arrows / connectors UI User interface updates Usability Make mod easier to use
Milestone

Comments

@kianzarrin
Copy link
Collaborator

This code seems to provide support for bidirectional lanes as it adds lanes in both directions:

CreateLaneConnection(lane1Id, lane2Id, startNode1);

First of all do we need reverse connection if the lanes are not bidirectional?
Secondly when I tried to connect bidirectional lanes back and forth I noticed intermittent problems. I did not mange to capture them on screen due to its intermittency but this is what happens:

  • Sometimes when I connect one bidirectional lane to another, I can see both the forward and reverse lane connection curves. and sometimes I do not.
  • when I lane1 to lane2 and then I connect lane2 to lane1, The reverse lane connection curves sometimes appears and sometimes it does not. Some other times both the forward and reverse lane connections curves disappear (notice that before hand the reverse connection did not visually exist).

If you play with them long enough you will see.

I tested using this asset: https://steamcommunity.com/sharedfiles/filedetails/?id=1308307531
Screenshot (685)

@kianzarrin kianzarrin added BUG Defect detected triage Awaiting issue categorisation labels Mar 10, 2020
@originalfoo
Copy link
Member

First of all do we need reverse connection if the lanes are not bidirectional?

Very good quesiton. Personally, I'd say no. Whole purpose of lane connector is to allow user to specifically decide which incoming lanes link to which outgoing lanes.

I suspect it was implemented the current way to avoid UI issues once a lane is connected in one direction (the circle for the return direction would be obscured by the existing connection).

Bidirectional lanes are a freaking nightmare lol.

@originalfoo originalfoo added LANE ROUTING Feature: Lane arrows / connectors UI User interface updates Usability Make mod easier to use and removed triage Awaiting issue categorisation labels Mar 11, 2020
@originalfoo
Copy link
Member

Single-lane train tracks are bi-directional. Hence the Single Train Track AI. So there is already a usecase where people have bi-directional lanes that we'll need to deal with somehow.

Also, see #515 (comment)

@originalfoo
Copy link
Member

Kian wrote:

I tested using this asset: https://steamcommunity.com/sharedfiles/filedetails/?id=1308307531

REV0 (asset author):

Funicular tracks made in a way that vehicles dont switch lanes
Could be road setting related not sure
Aside that i didnt change anything unusual

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Apr 20, 2020

The main obstacle here is not the back-end but rather its the UI. the forward/backward lane curves cover one-another.

One solution is for the lane curves to overlap arrow heads.

@kianzarrin
Copy link
Collaborator Author

in case of bidirectional tracks One question is how to restrict lane transitions based on lane connections
1- source lanes with any incoming/outgoing connections are restricted to lane connections .
image
2- source lanes with outgoing connections are restricted to lane connections. if the lane has only incoming connections, it wouldn't influence its outgoing transitions.
image

in the second case its impossible to restrict lane transitions using lane connections (unless if there was a way to say restrict all outgoing transitions). So therefore I think we should apply the first approach.
Note: these restrictions only apply to source lanes. target lanes can accept lane transitions from multiple lanes even if they have incoming lane connection.

@kianzarrin
Copy link
Collaborator Author

AN assets to that I used for the tests
train-tracks2x2.zip

@originalfoo originalfoo added this to the 11.6.5.2 milestone Mar 19, 2022
@kianzarrin kianzarrin changed the title lane connector is buggy for bidirectional lanes [UI] lane connector is buggy for bidirectional lanes Mar 22, 2022
@kianzarrin kianzarrin changed the title [UI] lane connector is buggy for bidirectional lanes lane connector is buggy for bidirectional lanes Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected LANE ROUTING Feature: Lane arrows / connectors UI User interface updates Usability Make mod easier to use
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants