The International Simutrans Forum

PakSets and Customization => Pak128.Britain => Topic started by: jamespetts on February 13, 2013, 01:38:43 AM

Title: Rail vehicle alignment
Post by: jamespetts on February 13, 2013, 01:38:43 AM
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:

(http://www.bridgewater-brunel.me.uk/screenshots/overhang.png)

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:

(http://www.bridgewater-brunel.me.uk/screenshots/narrowgauge-alignment.png)

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 (https://github.com/jamespetts/simutrans-pak128.britain/commit/3622596e22be133735a54249b374bf76a2c335d8).

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.
Title: Re: Rail vehicle alignment
Post by: Milko on February 13, 2013, 07:35:24 AM
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
Title: Re: Rail vehicle alignment
Post by: jamespetts on February 13, 2013, 11:08:28 AM
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.
Title: Re: Rail vehicle alignment
Post by: wlindley on February 13, 2013, 12:52:00 PM
Will this update also correct gaps like this?
Title: Re: Rail vehicle alignment
Post by: jamespetts on February 13, 2013, 09:23:16 PM
I had hoped that it would, but preliminary testing suggests not.
Title: Re: Rail vehicle alignment
Post by: greenling on February 13, 2013, 09:50:47 PM
Hello Jamespetts
Have you update pak128.britain exp to with this fix?
Title: Re: Rail vehicle alignment
Post by: jamespetts on February 13, 2013, 10:07:27 PM
Not yet - work is still in preliminary stages.
Title: Re: Rail vehicle alignment
Post by: greenling on February 14, 2013, 04:52:39 PM
Ok
That must i wait.
Title: Re: Rail vehicle alignment
Post by: jamespetts on February 15, 2013, 01:17:52 AM
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.
Title: Re: Rail vehicle alignment
Post by: jamespetts on February 15, 2013, 02:07:06 PM
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 (http://forum.simutrans.com/index.php?topic=11473.new#new) for details). This should not affect Standard, however.