Page 1 of 4

New Patch: Speed Signs

Posted: 26 Mar 2006 16:17
by richk67
This adds a feature Im calling Speed Signs; it places a desired speed marker on a track, and the trains choose the routes based on what speed they can do.

For example;
Slow: trains <= 55mph prefer this route, medium trains slightly dislike it, fast trains strongly dislike it.
Medium: slow trains slightly dislike it, medium trains prefer this route, fast trains slightly dislike it
Fast: slow trains strongly dislike this route, medium trains slighty dislike, fast trains prefer the route.

Given three otherwise equal routes, the fast trains go down the fast lane, the slow trains down the slow lane, the medium down medium lane. If a track has no speed signal, there is no bias. When a train "prefers" a route, it is slightly positively biassed to it compared to a no-signal route.

If you have two slow trains following each other, and one heads down the slow route, if the second sees a red (at the point of decision) for the slow route, it will take an alternative. This way, although the train's preferred speed route is blocked, it can take other speed routes instead. This prevents deadlocks.

The GUI
I have added an extra button to the rail toolbar at the end, reusing the "purchase land" graphic button. This works similarly to placing signals.

One click on a rail tile, places a SLOW sign. A second click changes it to a MEDIUM sign, a third to a FAST sign.

Click on Remove to remove the signs.

Graphics: many many thanks to MeusH for the artwork, and egladil for the .grf.

Known issue: on tiles with 2 diagonal tracks, the speed sign appears on both tracks, and applies to both tracks. I may be able to resolve this, but I would have to use more map4 bits. Currently I only need 2, to solve this would need a speed sign per possible track side. Given that normal OTTD already has quirks with signals on these tiles (you can only have 1 type of signal per TILE), I am leaving this for the moment.

Please try it out on some big multitrack mainlines. I would be interested to get feedback.

Posted: 26 Mar 2006 16:33
by MeusH
Very good job. You want suggestions, don't you?

I think specyfying the speed should be placed in configure patches menu.

Unfortunatelly, in multiplayer the server's settings would override players' settings. But this way is better than using small map-array space IMO.


I'm doing the graphics soon.

Posted: 26 Mar 2006 16:39
by Wolf01
very good job

now make a signal that is red when there is no train and green when there is a train
and a entrance/combo presignal that is red when at least one exit presignal is red :D

these would allow me to make AND and NOT logic gates, today we can make only OR logic gates (if linked with other presignals)

Posted: 26 Mar 2006 16:49
by richk67
Wolf01 wrote:very good job

now make a signal that is red when there is no train and green when there is a train
and a entrance/combo presignal that is red when at least one exit presignal is red :D

these would allow me to make AND and NOT logic gates, today we can make only OR logic gates (if linked with other presignals)
Hardly part of my patch!! And I cant see any logical reason for their existence.... other than to create silly logic circuits out of track ;)

Posted: 26 Mar 2006 16:54
by Brianetta
I think Wolf wants his trains to be part of an FSM that can count trains into and out of a station+depot area, ensuring that the station and depot together never have more trains than platforms in the station.

Personally, I think a feature request for that would be more productive than a feature request for logic gates... but making silly logic circuits out of track is pretty cool in and of itself, and I think many of us can admit to having given it a go. (:

Posted: 26 Mar 2006 16:55
by Wolf01
that was the purpose ;)

i want to make more controlled junctions with priority

Posted: 27 Mar 2006 13:21
by MeusH
Hey richk67, take a look at the attachement, please, and give me the suggestions :wink:

Posted: 27 Mar 2006 13:35
by richk67
MeusH wrote:Hey richk67, take a look at the attachement, please, and give me the suggestions :wink:
Look good. I really like the full face triangle, but the other angles arent as strong.

Would it be possible to rework the other angles to look like a 3-sided pyramid (tetrahedron). The sign doesnt really have a facing like signals, and so a more solid look would be clearer.

Thanks for your work on this.

I think the third colour should be Orange. Red has too strong a connotation of "danger".

Posted: 27 Mar 2006 13:53
by MeusH
richk67 wrote:Would it be possible to rework the other angles to look like a 3-sided pyramid (tetrahedron). The sign doesnt really have a facing like signals
Sure, it is not only possible, but also required ;)
So the new tetrahedron-shaped sign would look fatter in first four, or six views?
richk67 wrote:I think the third colour should be Orange. Red has too strong a connotation of "danger".
About the colors, What are your picks? Green, blue, yellow? Green, yellow, grey?

And that's no problem, I like doing it

Posted: 27 Mar 2006 14:23
by richk67
MeusH wrote:So the new tetrahedron-shaped sign would look fatter in first four, or six views?
First 6 views would all be fatter, and the 8th view would see the edge of the tetrahedron rather than the pole. Im thinking of this as a regular tetrahedron stuck on top of the pole, so the pole will never overlap the sign.

We may only need 4 facings - front on, back on, and the side facing each way.
About the colors, What are your picks? Green, blue, yellow? Green, yellow, grey?
Green, Yellow, Blue. But maybe also Green, Yellow, Orange.
And that's no problem, I like doing it
Thanks. Appreciated.

Posted: 27 Mar 2006 15:39
by MeusH
richk67 wrote:
MeusH wrote:So the new tetrahedron-shaped sign would look fatter in first four, or six views?
First 6 views would all be fatter, and the 8th view would see the edge of the tetrahedron rather than the pole. Im thinking of this as a regular tetrahedron stuck on top of the pole, so the pole will never overlap the sign.
Just like the big sign on the left of the attachment?
richk67 wrote:We may only need 4 facings - front on, back on, and the side facing each way.
4 facings, as in the attachment?
(Front - one side visible. Rear, two angled - two sides visible)

Posted: 27 Mar 2006 17:37
by richk67
MeusH wrote:Just like the big sign on the left of the attachment?
richk67 wrote:We may only need 4 facings - front on, back on, and the side facing each way.
4 facings, as in the attachment?
(Front - one side visible. Rear, two angled - two sides visible)
Absolutely spot on... I really look forawrd to these :)

Posted: 27 Mar 2006 19:06
by MeusH
Not as much as I wanted, but here's a quick preview.

The shapes still need correction, I appreciate help from advanced graphics creator on how to draw such a small shape properly.

The yellow and orange mix too much, but I can make yellow more beige. I'm wondering how would it look for colorblind people, I know some play OpenTTD.

Posted: 27 Mar 2006 19:22
by hertogjan
The yellow and orange ones are practically undistinguishable.
Can't you do something with the shapes as well? So maybe use signs with one, two or three bars (for low, medium and high speed limits, respectively). An alternative way might be a triangle with point down for low, a square sign for medium, and a triangle with point upwards for high speed limit.
Those would also fix the colour-blindness issue.
Personally, my favourite is the one with the bars, as the can easily be made visible from behind as well.

Posted: 27 Mar 2006 20:38
by richk67
MeusH wrote:Not as much as I wanted, but here's a quick preview.

The shapes still need correction, I appreciate help from advanced graphics creator on how to draw such a small shape properly.

The yellow and orange mix too much, but I can make yellow more beige. I'm wondering how would it look for colorblind people, I know some play OpenTTD.
Hmm... yeah, the orange doesnt work if we keep the yellow. However, I think the orange will work better than yellow to stand out.

Could you make the yellow, blue? A sort of mid blue.

The order I would think would be FAST-green, MEDIUM-orange, SLOW-blue.

I also quite like the upside down triangle, but the fatter pyramids I think will work well.

Posted: 27 Mar 2006 20:57
by MeusH
And now?

Posted: 27 Mar 2006 21:02
by richk67
MeusH wrote:And now?
Very clear. Nice :)

Posted: 27 Mar 2006 21:37
by MeusH
Blue inverted. Reworked green and blue, thus lack of detail. At least the shape is visible

Posted: 28 Mar 2006 06:20
by sidew
The order I would think would be FAST-green, MEDIUM-orange, SLOW-blue.
IMHO, the best is:
fast - blue
medium - green
slow - orange

Posted: 28 Mar 2006 09:29
by Sacro
Yes, blue for fastest seems better to me also.