Simutrans Forum Archive

The International Simutrans Forum > Requests and Discussion > Extension Requests (Moderator: fagonella) > Topic: Railtrack extension request
Author
Topic: Railtrack extension request  (Read 2365 times)
Timothy
Member
*
*
*
*
*
Gender: Male
Posts: 2163
pak64 - every pixel counts
Railtrack extension request
Last Edit: December 09, 2006, 09:48:30 AM by Timothy
Ever since I started work on this I've been thinking about ways this effect could be generated automatically by the game - switches (or "points" as they're called here in the UK... ponder) that appear different based on the layout of the tiles around them.

Take this example image:



All of the T-junctions are, internally, the same, trains can use each of them in the normal way, they just look different. This extension request has 2 parts, the first is about how the tracks actually look, the second about the way they behave.

1) How they look...

My idea is based on the way town growth works, with 3x3 grid templates which are checked against the town to determine where a house should be placed next, if the 8 tiles around the center tile match the pattern of the rule, then a house is built on that square, essentially. I am thinking, this could be applied to railway track also, have 3x3 grid rules to determine the placement of each type of switch.



In this image you can see the idea explained in detail, the grids would use the "ribi" or direction of each tile, both masked and unmasked. in this way you can make a rule for each possible permutation - each one linked to a particular switch type (which is built if the tiles around the tile in question match the pattern). By considering both masked and unmasked direction signalling can be taken into account, allowing the switches not only to reflect "realistic" train movement (see point 2) but also the ways trains could possibly move on account of signals.

[1] shows how a simple length of track looks (ribi 5 means North and South), [2] shows a spur, which would be produced by this pattern of ribis on tiles, if the track veered off, rather than going in the same direction as the origin track, a different switch could be used. [3] shows the same rule but with two spurs. [4] shows how the masked ribi affect the same physical track layout, producing differently drawn layouts. The first is for crossing over two parrallel tracks, the second a simple crossover, the third a somewhat unlikely layout. [5] Shows how patterns would "overlap" to produce more complex layouts over many tiles.

2) How the tracks work...

Consider [2] in the image above, trains coming from the north on one track would not, physically, be able to go around such a sharp bend and return along the parrallel north-bound track. Only trains from the south could go north on either spur, or vice-versa. This is why the graphic displays as it does - a reflection of physical restriction. However, in the game this would still allow trains to do the physically unlikely... I'd like to suggest stopping this sort of behaviour, by imposing ribi masking as a consequence of the above method. Trains coming from the north would see the switch as being "south-only", trains coming from the south would see the switch as having both exit options.

Quite a complex idea doh

* diag.png (13.89 KB, 750x500 - viewed 46 times.)

<< Click here for a list of my Simutrans creations >>
fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
Quite a complex idea doh

Complex indeed, but surely worthwhile!!! y_worship

Total support! Thumb up
Isaac.Eiland-Hall
Benevolent Dictator
Member
*
*
*
Gender: Male
Posts: 6700
Re: Railtrack extension request
If this is considered, it would also be useful for roads as well...

Signed,
Mr. Road-loving B. D.  whistle
fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
(Only, I fear, we should be able to place signals every tile, to set correct ribis, not each other tile like now...)
stormoog
heeft een nog onbekende vertraging
Member
*
*
*
Posts: 3269
Aide-toi, le ciel t'aidera.
Re: Railtrack extension request
I understand that Timothy wants them to be set automatically...
Timothy
Member
*
*
*
*
*
Gender: Male
Posts: 2163
pak64 - every pixel counts
Re: Railtrack extension request
I understand that Timothy wants them to be set automatically...

You should be able to set signals manually, which would then influence the layout of the tracks as they appear... However also certain track layouts should limit the ways trains can go, where the track doubles back sharply, for example, it should prevent trains taking that path (to force you to make "realistic" layouts.

<< Click here for a list of my Simutrans creations >>
robofish
Member
*
*
*
*
Gender: Male
Posts: 821
Re: Railtrack extension request
sounds VERY cool!  y_worship y_worship


VS
Vladimír Slávik
Member
*
*
*
Gender: Male
Posts: 1568
284545810
Re: Railtrack extension request
we should be able to place signals every tile, not each other tile like now...
I believe this restriction comes from: when applying a tool to a tile, which signal should be deleted, if there are two on both sides?

Tools for messing with Simutrans graphics. Template archive - templates and some other stuff for painters.
fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
I believe this restriction comes from: when applying a tool to a tile, which signal should be deleted, if there are two on both sides?

Both of them??? lol
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Railtrack extension request
With the current system I think this is not possible. Since you can built a 90° border, thus which way the switch should go? (like a T) Also I fear it would break too many layouts during loading.

I think, switching "points" during route reservation should be good enough eyecandy and will still show an elegant track layout.

I could not agree on the nine surrounding method, since I see a lot not unique suitations here. And we have with only 9 tiles already 27 permutations, with 15 ribis If you could provide a state table of all layouts I could think about it.

But you table is relatively incomplete: for instance you completely ignored T and -|- junctions. E.g. what would you suggest, if there is not a bend in number 3 tile 3 but a straight track to the left? Also, if I rotate the lower number 5 pointwise 180° I get the upper one with the same signal positions but the track is not the same. This is probably also not right. Imho only a double X-crossing like in 3 is allowed here.

Concerning disallowing 90° turn on the switch this would be easily possible as an addon on the routefinder (maybe even from the simuconf.tab, so to not break old games). Together with the switches based on the route, this would graphically have a similar effect and would take care of T and X junctions be default.

Changing the ribis would be worse, since this would require a complete rewrite of hills, ways and everything concerning directions, I fear.

Signals: Every signal is actually two signals on both sides of the tile border. Thus, a signal every tile is not possible, since there is an invisible signal already there. I tried to change this with PBS, but unfourtunately this was not an easy done task. Something for the long winter months rather.
stormoog
heeft een nog onbekende vertraging
Member
*
*
*
Posts: 3269
Aide-toi, le ciel t'aidera.
Re: Railtrack extension request
Concerning disallowing 90° turn on the switch this would be easily possible as an addon on the routefinder (maybe even from the simuconf.tab, so to not break old games). Together with the switches based on the route, this would graphically have a similar effect and would take care of T and X junctions be default.

Support.
fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
Concerning disallowing 90° turn on the switch this would be easily possible as an addon on the routefinder (maybe even from the simuconf.tab, so to not break old games). Together with the switches based on the route, this would graphically have a similar effect and would take care of T and X junctions be default.

Thumb up Support!

BUT
1) 90° turn should be disallowed by DEFAULT, switchable on by simuconf.tab
2) 90° turn should be disallowed for TRAINS, but allowed for trams (thus untroducing a further distinction between the two; avoiding 90° turns in cities would be painful)
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Railtrack extension request
I mean 180° turns like now used to stop citycars on certain roads:
-\
-/

90° turn I cannot disallow. This will not work.
Timothy
Member
*
*
*
*
*
Gender: Male
Posts: 2163
pak64 - every pixel counts
Re: Railtrack extension request
I mean 180° turns like now used to stop citycars on certain roads:
-\
-/

90° turn I cannot disallow. This will not work.

Yes, only 180° turns should be disallowed, having trains go through 90° is fine, it's just when they double back on themselves I find unrealistic...

If this could be allowed, however, for trams then that would be ok, trams obviously have a smaller minimum curve, monorail too.

<< Click here for a list of my Simutrans creations >>
fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
Full support for disabling 180° turns by default!!!

They are really horrible and very unrealistic...

y_grin
Isaac.Eiland-Hall
Benevolent Dictator
Member
*
*
*
Gender: Male
Posts: 6700
Re: Railtrack extension request
Agree for trains - wish 90 degree turns were easy to prohibit, but I can live with that... heh.

Here's why I wish citycars would make 180 degree turns: Wink
Timothy
Member
*
*
*
*
*
Gender: Male
Posts: 2163
pak64 - every pixel counts
Re: Railtrack extension request
Whoa... Kind of awesome, really shows off the fences on the front of tiles too... Smiley

<< Click here for a list of my Simutrans creations >>
robofish
Member
*
*
*
*
Gender: Male
Posts: 821
Re: Railtrack extension request
Agree for trains - wish 90 degree turns were easy to prohibit, but I can live with that... heh.

Here's why I wish citycars would make 180 degree turns: Wink
this could also be done with a train .... fr_smile


fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
this could also be done with a train .... fr_smile

But it's definitely unrealistic! In RL it could work... only with some narrow gauges... a tram-like train, indeed! y_thbbt
robofish
Member
*
*
*
*
Gender: Male
Posts: 821
Re: Railtrack extension request
no! I've seen a TV-report about special trains - something similar is used in Canada for example


fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
Last Edit: July 05, 2006, 07:28:47 AM by fagonella
spacial, aren't they? lol

EDIT: I mean: they're not just "normal", "ordinary" trains... in Simutrand they could be coded as trams, which will allow them to go on ordinary tracks as well!
prissi
Member
*
*
*
*
*
*
*
*
Gender: Male
Posts: 5135
Re: Railtrack extension request
The only thing: You could go up straight there too ...
Timothy
Member
*
*
*
*
*
Gender: Male
Posts: 2163
pak64 - every pixel counts
Re: Railtrack extension request
The only thing: You could go up straight there too ...

Which would make more sense anyway, as going up one long slope would take a lot less time for your train than going around twice as many corners, and still having to go up the same number of slopes anyway... ponder

<< Click here for a list of my Simutrans creations >>
stormoog
heeft een nog onbekende vertraging
Member
*
*
*
Posts: 3269
Aide-toi, le ciel t'aidera.
Re: Railtrack extension request
If it has enough traction (not game-technically speaking of course)
Isaac.Eiland-Hall
Benevolent Dictator
Member
*
*
*
Gender: Male
Posts: 6700
Re: Railtrack extension request
It's not as realistic, though... that's my only problem with it... which is what I forgot to say about it..... Smiley
fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
The only thing: You could go up straight there too ...

Unless you need to place a stop/station in between...
Timothy
Member
*
*
*
*
*
Gender: Male
Posts: 2163
pak64 - every pixel counts
Re: Railtrack extension request
Unless you need to place a stop/station in between...

In which case you still wouldn't need 180° turns =P

<< Click here for a list of my Simutrans creations >>
fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
In which case you still wouldn't need 180° turns =P

mrgreen

In fact I support 180° turns abolition (but for trains only)!!!
topchrisher
Christopher R. A.
Member
*
*
Gender: Male
Posts: 731
Bag of Fish!
Re: Railtrack extension request
It's not as realistic, though... that's my only problem with it... which is what I forgot to say about it..... Smiley

Yes, and at first I thought you were crazy or introducing such a complicated way to go up the hill.  But then I thought about it: when is that last time that I've driven up a hill that large and just gone straight?  That hill is practically a mountain.

Maybe it would be better if there were an option in the .dat files for the ability of a train to make a 180-degree turn.  It seems to me that this would be a more elegant solution, since the ability to make the 180 turn is different depending on which vehicle is trying to do it.

Also, now that we have "private road" signs, is it time to allow citycars to make 180-degree turns?

Final Note: I support the original idea, although I do not understand the technical problems related to it.
fagonella
live from Bucharest
Board Mod
Member
*
*
*
*
*
*
*
Gender: Male
Posts: 4016
Re: Railtrack extension request
Maybe it would be better if there were an option in the .dat files for the ability of a train to make a 180-degree turn.  It seems to me that this would be a more elegant solution, since the ability to make the 180 turn is different depending on which vehicle is trying to do it.

Support! y_grin
Isaac.Eiland-Hall
Benevolent Dictator
Member
*
*
*
Gender: Male
Posts: 6700
Re: Railtrack extension request
I assume the citycards not making 180 degree turns was a bug that Prissi hadn't felt important enough to solve, that also happened to be exploitable by those of us wanting a private_road sign... hehehe

OTOH, that may not be the case.... If not, I certainly support the lifting of the prohibition. Cheesy
The International Simutrans Forum > Requests and Discussion > Extension Requests (Moderator: fagonella) > Topic: Railtrack extension request