CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
571 stars 85 forks source link

separete lane connections for track/road vehicles. #1550

Closed kianzarrin closed 2 years ago

kianzarrin commented 2 years ago

fixes #354

Bonus:

TMPE.zip

pictures are in the comments.

Tests:

mixed connections tests: connect car and track differently on a mixed car+tram lane and:

backward compatibility test:

TODO:

kianzarrin commented 2 years ago

image image image

originalfoo commented 2 years ago

Suggestion: Concise tooltips when mouse hovers over one of the shapes to help user understand what the shape represents.

kvakvs commented 2 years ago

Looks nice Make sure that the textures you draw have enough resolution to not be more blurry than the lane sausages and the small circles, so that it looks nice together. Currently on screenshots the triangles are more blurry and standing out.

originalfoo commented 2 years ago

Currently on screenshots the triangles are more blurry and standing out.

To me it looks like the triangles are fine, but the black border around them is thinner than the black border around the circles, so it's maybe just the black border that's looking blurry?

kianzarrin commented 2 years ago

Currently on screenshots the triangles are more blurry and standing out.

Both triangle and the diamond use the same texture: 256x256 white (the quad gives it shape). So I don't think its a resolution issue. I don't notice any blur. maybe that is just how the overlay shader works?

but the black border around them is thinner than the black border around the circles

You are right. I expand them.

Concise tooltips when mouse hovers over one of the shapes to help user understand what the shape represents.

I could put legend in the tooltips. but I think that is too much info. I think when user will figure out what the shapes mean when he uses them in double quick time

kianzarrin commented 2 years ago

@kvakvs @krzychu124 @aubergine10 I was wondering maybe I can draw squares for uni-directional tracks and diamonds for bi-directional tracks. triangles are not easy to work with:

What shape do I use for mixed lanes? Currently i just use the same shape as tracks.

kianzarrin commented 2 years ago

Enlarged triangle outline image

EDIT: used texture-less triangle to draw the black outline:

kvakvs commented 2 years ago

I think you do not need special shape for single/bidirectional lane ends, one shape is fine. Hell even circle is fine. A shape shows the traffic source, so shape on both ends of a junction means traffic comes from both directions.

Since you're using a PNG file it should make no difference in your code, whatever shape you draw in photoshop, even a 🍆 will work just fine, so triangles will work too. But the black outline is still very blurry.

kianzarrin commented 2 years ago

@kvakvs Since you're using a PNG file it should make no difference in your code, whatever shape you draw in photoshop, even a 🍆 will work just fine, so triangles will work too. But the black outline is still very blurry.

1- Centering stuff does matter. 2- I am using square. because triangle will look ugly: img

kianzarrin commented 2 years ago

I ditched triangle and am using square now. Triangle looks a bit ugly and is hard to write the code. image

Also the diamond is no longer filled: image

originalfoo commented 2 years ago

Looks good!

kianzarrin commented 2 years ago

about backward compatibility at train stations: In TMPE stable one lane connection like bellow is enough to make trains stay in lane. image The same is true with TMPE in this PR: image

This makes backward compatibility easy. There is no need to keep connections that from target to source when loading legacy game.

Removing connections in the wrong direction also solves this issue that happens when you remove lane connections that was made using legacy TMPE: image

krzychu124 commented 2 years ago

Sync with master :)