News:

Simutrans Sites
Know our official sites. Find tools and resources for Simutrans.

Rail vehicle alignment

Started by jamespetts, February 13, 2013, 01:38:43 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

jamespetts

I have been doing some experimentation with the alignment of rail vehicles in this pakset. As many regular users will know, trains commonly overhang the end of a line as shown below:



I have always found this a most irritating issue, and one which detracts substantially from the visual amenity of the game. I have been looking into whether this problem can be cured by offsets, and have developed a set of offsets which seem to have the desired effect, at least for the narrow gauge vehicles for which I have been testing it. Here is a sample:



Notice how the train, which has fully stopped and is in the process of loading/unloading, does not go beyond the end of the track. An identical set of offsets applied to every narrow gauge vehicle seems to have been effective. An example is given below of the Ffestiniog Railway's "George England" locomotive showing the standardised offsets:


# http://www.festipedia.org.uk/wiki/Palmerston

obj=vehicle
name=George-England
engine_type=steam
smoke=Steam
speed=45
#gear=200
power=78
# Calculated from values from "Ffestiniog & Welsh Highland Railways - illustrated stock list" (2011 ed.) p. 20
tractive_effort=17
copyright=James/jamespetts
intro_year=1863
intro_month=7
# Functional rather than historical: for introduction of single Fairlie
retire_year=1876
retire_month=12
waytype=narrowgauge_track
freight=None
payload=0
length=4
rolling_resistance=20

http://www.festipedia.org.uk/wiki/Princess
weight=10
cost=1726769
runningcost=89
sound=-1

can_lead_from_rear=0
bidirectional=0

Constraint[Next][0]=George-England-tender

liverytype[0]=FR-Royal-Purple
liverytype[1]=FR-Royal-Purple-Cream
liverytype[2]=FR-Col-Stephens
liverytype[3]=FR-Cherry-Red

EmptyImage[E][0]=./images/george-england-maroon.1.0,-10,-5
EmptyImage[SE][0]=./images/george-england-maroon.1.1
EmptyImage[S][0]=./images/george-england-maroon.1.2,10,-5
EmptyImage[SW][0]=./images/george-england-maroon.1.3
EmptyImage[W][0]=./images/george-england-maroon.1.4,10,5
EmptyImage[NW][0]=./images/george-england-maroon.1.5
EmptyImage[N][0]=./images/george-england-maroon.1.6,-10,5
EmptyImage[NE][0]=./images/george-england-maroon.1.7

EmptyImage[E][1]=./images/george-england-scarlet.1.0,-10,-5
EmptyImage[SE][1]=./images/george-england-scarlet.1.1
EmptyImage[S][1]=./images/george-england-scarlet.1.2,10,-5
EmptyImage[SW][1]=./images/george-england-scarlet.1.3
EmptyImage[W][1]=./images/george-england-scarlet.1.4,10,5
EmptyImage[NW][1]=./images/george-england-scarlet.1.5
EmptyImage[N][1]=./images/george-england-scarlet.1.6,-10,5
EmptyImage[NE][1]=./images/george-england-scarlet.1.7

EmptyImage[E][2]=./images/george-england-green.1.0,-10,-5
EmptyImage[SE][2]=./images/george-england-green.1.1
EmptyImage[S][2]=./images/george-england-green.1.2,10,-5
EmptyImage[SW][2]=./images/george-england-green.1.3
EmptyImage[W][2]=./images/george-england-green.1.4,10,5
EmptyImage[NW][2]=./images/george-england-green.1.5
EmptyImage[N][2]=./images/george-england-green.1.6,-10,5
EmptyImage[NE][2]=./images/george-england-green.1.7

EmptyImage[E][3]=./images/george-england-scarlet.1.0,-10,-5
EmptyImage[SE][3]=./images/george-england-scarlet.1.1
EmptyImage[S][3]=./images/george-england-scarlet.1.2,10,-5
EmptyImage[SW][3]=./images/george-england-scarlet.1.3
EmptyImage[W][3]=./images/george-england-scarlet.1.4,10,5
EmptyImage[NW][3]=./images/george-england-scarlet.1.5
EmptyImage[N][3]=./images/george-england-scarlet.1.6,-10,5
EmptyImage[NE][3]=./images/george-england-scarlet.1.7

---

obj=vehicle
name=George-England-tender
engine_type=steam
speed=45
#gear=200
power=0
copyright=James/jamespetts
intro_year=1863
intro_month=7
# Functional rather than historical: for introduction of single Fairlie
retire_year=1876
retire_month=12
waytype=narrowgauge_track
freight=None
payload=0
length=2
rolling_resistance=20

weight=3
cost=0
runningcost=0
sound=-1

can_lead_from_rear=0
bidirectional=0

Constraint[Prev][0]=George-England

liverytype[0]=FR-Royal-Purple
liverytype[1]=FR-Royal-Purple-Cream
liverytype[2]=FR-Col-Stephens
liverytype[3]=FR-Cherry-Red

EmptyImage[E][0]=./images/george-england-tender-maroon.1.0,-10,-5
EmptyImage[SE][0]=./images/george-england-tender-maroon.1.1
EmptyImage[S][0]=./images/george-england-tender-maroon.1.2,10,-5
EmptyImage[SW][0]=./images/george-england-tender-maroon.1.3
EmptyImage[W][0]=./images/george-england-tender-maroon.1.4,10,5
EmptyImage[NW][0]=./images/george-england-tender-maroon.1.5
EmptyImage[N][0]=./images/george-england-tender-maroon.1.6,-10,5
EmptyImage[NE][0]=./images/george-england-tender-maroon.1.7

EmptyImage[E][1]=./images/george-england-tender-scarlet.1.0,-10,-5
EmptyImage[SE][1]=./images/george-england-tender-scarlet.1.1
EmptyImage[S][1]=./images/george-england-tender-scarlet.1.2,10,-5
EmptyImage[SW][1]=./images/george-england-tender-scarlet.1.3
EmptyImage[W][1]=./images/george-england-tender-scarlet.1.4,10,5
EmptyImage[NW][1]=./images/george-england-tender-scarlet.1.5
EmptyImage[N][1]=./images/george-england-tender-scarlet.1.6,-10,5
EmptyImage[NE][1]=./images/george-england-tender-scarlet.1.7

EmptyImage[E][2]=./images/george-england-tender-green.1.0,-10,-5
EmptyImage[SE][2]=./images/george-england-tender-green.1.1
EmptyImage[S][2]=./images/george-england-tender-green.1.2,10,-5
EmptyImage[SW][2]=./images/george-england-tender-green.1.3
EmptyImage[W][2]=./images/george-england-tender-green.1.4,10,5
EmptyImage[NW][2]=./images/george-england-tender-green.1.5
EmptyImage[N][2]=./images/george-england-tender-green.1.6,-10,5
EmptyImage[NE][2]=./images/george-england-tender-green.1.7

EmptyImage[E][3]=./images/george-england-tender-scarlet.1.0,-10,-5
EmptyImage[SE][3]=./images/george-england-tender-scarlet.1.1
EmptyImage[S][3]=./images/george-england-tender-scarlet.1.2,10,-5
EmptyImage[SW][3]=./images/george-england-tender-scarlet.1.3
EmptyImage[W][3]=./images/george-england-tender-scarlet.1.4,10,5
EmptyImage[NW][3]=./images/george-england-tender-scarlet.1.5
EmptyImage[N][3]=./images/george-england-tender-scarlet.1.6,-10,5
EmptyImage[NE][3]=./images/george-england-tender-scarlet.1.7


I have not set offsets for the ordinal directions, as it is not clear whether this is necessary: platforms are not possible in the ordinal directions and it is unlikely that a train will ever terminate on them. There are some gaps/overlapping in transitions, but I have seen these even without any offsets applied. I should be interested if anyone were to wish to experimental with ordinals.

The whole set of re-aligned narrow gauge vehicle .dat files is available on my Github repository.

I do not yet know whether the same offsets will work for standard gauge trains (or trams or maglev trains, for that matter), but I am minded to try it. Feedback on the work so far would be appreciated before I take time in going further, however.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Milko

Hello


I think that the problem is not solved by using offsets. Using the offsets the entire tile is moved. Use the offset for trains means that whenever a train goes round a curve (test with a sharp bend) some coaches will override the previous or subsequent due to its offset that have some directions than others. I tried the offset for aircraft that have the same graphic problem in airports, on airplanes intervene is easier because the tile is one and therefore there is no overlap, the only problem is that when the plane changes direction the movement is not is more fluid, but you can see a arretraemento or fast forward.

Other threads that may help:

http://forum.simutrans.com/index.php?topic=6844.msg65882#msg65882

http://forum.simutrans.com/index.php?topic=7931.msg75538#msg75538

Giuseppe

jamespetts

I have not yet tried realigning ordinals - that is the next step, I think. However, as indicated before, the movement around corners is imperfect in any event, and there is much to be said for the point that the anomaly at termini that this fixes is more significant than any anomaly at corners which it introduces.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

wlindley

Will this update also correct gaps like this?

jamespetts

I had hoped that it would, but preliminary testing suggests not.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

greenling

Hello Jamespetts
Have you update pak128.britain exp to with this fix?
Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

jamespetts

Not yet - work is still in preliminary stages.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

greenling

Opening hours 20:00 - 23:00
(In Night from friday on saturday and saturday on sunday it possibly that i be keep longer in Forum.)
I am The Assistant from Pakfilearcheologist!
Working on a big Problem!

jamespetts

I have now re-aligned the ordinals for narrow gauge vehicles in my Github branch. A sample of the values used is reproduced below:


# http://www.festipedia.org.uk/wiki/Palmerston

obj=vehicle
name=George-England
engine_type=steam
smoke=Steam
speed=45
#gear=200
power=78
# Calculated from values from "Ffestiniog & Welsh Highland Railways - illustrated stock list" (2011 ed.) p. 20
tractive_effort=17
copyright=James/jamespetts
intro_year=1863
intro_month=7
# Functional rather than historical: for introduction of single Fairlie
retire_year=1876
retire_month=12
waytype=narrowgauge_track
freight=None
payload=0
length=4
rolling_resistance=20

http://www.festipedia.org.uk/wiki/Princess
weight=10
cost=1726769
runningcost=89
sound=-1

can_lead_from_rear=0
bidirectional=0

Constraint[Next][0]=George-England-tender

liverytype[0]=FR-Royal-Purple
liverytype[1]=FR-Royal-Purple-Cream
liverytype[2]=FR-Col-Stephens
liverytype[3]=FR-Cherry-Red

EmptyImage[E][0]=./images/george-england-maroon.1.0,-10,-5
EmptyImage[SE][0]=./images/george-england-maroon.1.1,0,-5
EmptyImage[S][0]=./images/george-england-maroon.1.2,10,-5
EmptyImage[SW][0]=./images/george-england-maroon.1.3,10,0
EmptyImage[W][0]=./images/george-england-maroon.1.4,10,5
EmptyImage[NW][0]=./images/george-england-maroon.1.5,0,5
EmptyImage[N][0]=./images/george-england-maroon.1.6,-10,5
EmptyImage[NE][0]=./images/george-england-maroon.1.7,-10,0

EmptyImage[E][1]=./images/george-england-scarlet.1.0,-10,-5
EmptyImage[SE][1]=./images/george-england-scarlet.1.1,0,-5
EmptyImage[S][1]=./images/george-england-scarlet.1.2,10,-5
EmptyImage[SW][1]=./images/george-england-scarlet.1.3,10,0
EmptyImage[W][1]=./images/george-england-scarlet.1.4,10,5
EmptyImage[NW][1]=./images/george-england-scarlet.1.5,0,5
EmptyImage[N][1]=./images/george-england-scarlet.1.6,-10,5
EmptyImage[NE][1]=./images/george-england-scarlet.1.7,-10,0

EmptyImage[E][2]=./images/george-england-green.1.0,-10,-5
EmptyImage[SE][2]=./images/george-england-green.1.1,0,-5
EmptyImage[S][2]=./images/george-england-green.1.2,10,-5
EmptyImage[SW][2]=./images/george-england-green.1.3,10,0
EmptyImage[W][2]=./images/george-england-green.1.4,10,5
EmptyImage[NW][2]=./images/george-england-green.1.5,0,5
EmptyImage[N][2]=./images/george-england-green.1.6,-10,5
EmptyImage[NE][2]=./images/george-england-green.1.7,-10,0

EmptyImage[E][3]=./images/george-england-scarlet.1.0,-10,-5
EmptyImage[SE][3]=./images/george-england-scarlet.1.1,0,-5
EmptyImage[S][3]=./images/george-england-scarlet.1.2,10,-5
EmptyImage[SW][3]=./images/george-england-scarlet.1.3,10,0
EmptyImage[W][3]=./images/george-england-scarlet.1.4,10,5
EmptyImage[NW][3]=./images/george-england-scarlet.1.5,0,5
EmptyImage[N][3]=./images/george-england-scarlet.1.6,-10,5
EmptyImage[NE][3]=./images/george-england-scarlet.1.7,-10,0


Re-aligning the ordinals has resulted in less anomalies when turning corners than before. I have yet to test whether these values are suitable for standard gauge vehicles.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

jamespetts

I have found that this does not work as well as might be expected in Experimental, as the overhanging behaviour returns when the vehicles are in reverse formation (see here for details). This should not affect Standard, however.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.