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

bi-directional lane connection UI #1214

Closed
Tracked by #1479
kianzarrin opened this issue Dec 3, 2021 · 14 comments · Fixed by #1492
Closed
Tracked by #1479

bi-directional lane connection UI #1214

kianzarrin opened this issue Dec 3, 2021 · 14 comments · Fixed by #1492
Assignees
Labels
feature A new distinct feature LANE ROUTING Feature: Lane arrows / connectors UI User interface updates
Milestone

Comments

@kianzarrin
Copy link
Collaborator

kianzarrin commented Dec 3, 2021

now that lane connections are uni-directional, there is a need for UI to have special code for bi-directional lanes.

  • Modifier-key + click creates connection in both directions. (click creates connection in both directions but modifier+click creates in one directions)
  • connections should have arrow heads (we can limit this to bidirectional lanes to improve performance if rendering overlays).

Note: the current lane connector tool is confused and bugged when dealing with bi-directional lanes. It feels as though it is expecting uni-directional connections. with my uni-directional fix at the back-end (#1211) , the UI is no longer confused but rather uni-directional.

@kianzarrin kianzarrin added feature A new distinct feature triage Awaiting issue categorisation labels Dec 3, 2021
@kianzarrin kianzarrin changed the title bi-directional lane connection bi-directional lane connection UI Dec 3, 2021
@originalfoo
Copy link
Member

Could you illustrate some situations in where this will be used? The one I can think of currently is to get some control over where a train line can reverse direction (eg. only allow direction changes at terminus stations), but not sure if that encompasses what the purpose is of directional connectors...?

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Dec 4, 2021

lets say someone is using this bidirectional train network : https://steamcommunity.com/sharedfiles/filedetails/?id=1308307531

In would be hard to set all the connections both-ways:
image

and also its not clear where is the start/end of each connection in cases where someone needs a one-way connection.

@originalfoo
Copy link
Member

originalfoo commented Dec 4, 2021

So that blue lane, for example, could be bi-directional for the north/south connection, and one-direction for the south/west connection?

Where would the arrow(s) appear, and what happens as the number of connections increases and arrows start overlapping each other but at slightly different rotations?

@originalfoo
Copy link
Member

IIRC there are also some roads with bi-directional turning lanes (in NEXT2 for example)... And possibly stuff like this. So whatever solution we use for bi-directional tracks should also work on roads.

@originalfoo
Copy link
Member

Could bi-direction connector wires be "dotted line", both while dragging and when placed? A placed bi-directional connector wire could possibly alternate between the colors of the lanes it connects (eg. blue and green). While dragging, destination colour could be transparent?

If a user places a one-way connector from A to B, and then another one-way connector from B to A, effectively creating a bi-directional link but with 2 one-way connectors, we could replace those with a single dotted bi-directional wire?

For one-way connectors coming from a bi-directional lane, the arrow could be visible at target end when source lane is selected or hovered?

We could possibly ditch the lane circles and replace with a marker that shows user what kind of lane it is? <> for bidirectional, > (pointing in relevant direction) for one-way? When 'one way' modifier held the selected source lane maker could change from <> to >, or the > part of <> could become white, to confirm 'one way' mode ?

@kianzarrin
Copy link
Collaborator Author

I thought a bit more about this and I think by default, all lane connections should be bi-directional. but when the user holds the alt-key then "alternate" uni-directional mode is activated. this is because 1- ppl are already used to bi-directional lane connector 2- ppl rarely want uni-directional connections.

So that blue lane, for example, could be bi-directional for the north/south connection, and one-direction for the south/west connection?

Yes

Where would the arrow(s) appear, and what happens as the number of connections increases and arrows start overlapping each other but at slightly different rotations?

Good point! hadn't thought of that. I don't know what to do! maybe bi-directional lanes could be thicker? or maybe we could only show the arrows when the lane is selected? maybe we can show the arrows in the middle of the lane to avoid confusion with the <> idea be bellow

@aubergine10 We could possibly ditch the lane circles and replace with a marker that shows user what kind of lane it is? <> for bidirectional, > (pointing in relevant direction) for one-way? When 'one way' modifier held the selected source lane maker could change from <> to >, or the > part of <> could become white, to confirm 'one way' mode ?

very cool idea indeed!

Could bi-direction connector wires be "dotted line", both while dragging and when placed? A placed bi-directional connector wire could possibly alternate between the colors of the lanes it connects (eg. blue and green). While dragging, destination colour could be transparent?

I was hopping dotted lines would signify deleting a lane connections because since when I have enabled snapping, its not possible to tell if a connection is made (the floating line is covering up the real connection). In any case a dotted line feels weaker than a solid line and it is not intuitive that a bi-directional connection is dotted.

If a user places a one-way connector from A to B, and then another one-way connector from B to A, effectively creating a bi-directional link but with 2 one-way connectors, we could replace those with a single dotted bi-directional wire?

Yes. Currently the final wire will have a blend of color from both lanes (due to alpha blend feature). Not sure if this is a good way to represent bi-directional connections.

@originalfoo
Copy link
Member

Copied from #1479 (comment) (might be out of context of the existing discussion in #1214 but just pasting here in case its of use):

The visualisation should clearly indicate:

  • Default lane routings in cases where user hasn't specified custom lane routing (feint/thin dotted white lines?)
  • Which lanes are bidirectional (could we overlay a double-ended arrow ↔ on the lane?)
  • The direction of a lane connector (pointed triangle at ends? only show where applicable to declutter UI?)

@kianzarrin
Copy link
Collaborator Author

kianzarrin commented Mar 25, 2022

@aubergine10 @kvakvs instead of arrow heads 2/3rd if the way I was wondering maybe we could use bezier that has a different color on each side (EDIT: each sides color belongs to the source lane):
image
The fact that beziers currently have black/grey sheath around them might make things confusing, But we can get rid of those sheaths.

What do you think?

EDIT: the downside of this is with unidirectional connections its hard to tell the direction of the connection. Specially when we don't know what is the source/target lane color.

@kianzarrin kianzarrin self-assigned this Mar 25, 2022
@kianzarrin
Copy link
Collaborator Author

image

@kianzarrin
Copy link
Collaborator Author

image

@kvakvs
Copy link
Collaborator

kvakvs commented Mar 25, 2022

One more idea
Use normal vector (dot product thingy) which always points right. And offset 2 beziers in 2 directions which would otherwise overlap, so they are rendered side by side.

@originalfoo
Copy link
Member

Would it be cleaner with the connector sheath borders removed?

@kvakvs
Copy link
Collaborator

kvakvs commented Mar 25, 2022

Would it be cleaner with the connector sheath borders removed?

You mean the black borders? They are added for visibility, when rendered over a mottled background with too many varied colours, the black border adds contrast and improves visibility. How would that help?

@kianzarrin
Copy link
Collaborator Author

I see. they sound important. also the grey borders tell us which ones are coming from the selected lane.

@originalfoo originalfoo added this to the 11.6.5.2 milestone Mar 28, 2022
@originalfoo originalfoo added UI User interface updates LANE ROUTING Feature: Lane arrows / connectors and removed triage Awaiting issue categorisation labels Mar 28, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A new distinct feature LANE ROUTING Feature: Lane arrows / connectors UI User interface updates
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants