News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

11.3: Odd tram behavior (no accel. after climb)

Started by zook2, December 29, 2013, 09:54:21 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

zook2

(11.3, current Pak-Brit.128Ex)
It's 1861 and I built a tram (1 Horse, 1 Small Double-Deck Tram Trailer, weight 5t, max. speed 18 km/h). The funny thing is that after a single upward sloped tile, which slows it down from 18 to 4 km/h, the tram does not accelerate until the next curve. Happens after every slope, empty or loaded.

Except at one point in the network, where the tile directly after the slope is a curve, not a straight. Then it begins to accelerate on the second straight tile after the curve. But not if there are four straight tiles after the slope.

I haven't tried it with the other available trailer yet.

Correction: it begins accelerating from 4 to 18 km/h on the fourth tile after the climb. Is that normal behavior?

Correction #2: the other trailer (3 tons) accelerates after two tiles. So it probably works as intended...

jamespetts

Hills are a difficult thing to simulate in Simutrans, as they do not slope gently as in real life: rather, the land is either flat or sloped at a single, very steep, angle. Newer (and as yet unreleased) versions of Standard have improved upon this somewhat by adding the ability to have a second angle (defined by the pakset) so that slopes can be either shallow or steep, but this has not yet been incorporated into Experimental.

The hill climbing physics in Experimental are therefore somewhat of a compromise. The drag coefficient created by the hill and exerted upon a vehicle is based on the number of hill tiles that the vehicle has passed in the last X tiles (the X being customisable in simuconf.tab). This means that a hill like this:
       _
   _/
_/

is treated as being steeper than a hill like this:

                        ______________
       ________/
___/

which in turn is treated as being steeper than a small undulation:

                _______________________
_______/                                               \________________

to make this work, the vehicles have to treat a few tiles after a hill as part of the hill (but with a lessening degree of drag for each tile), which is why you do not see these trams accelerating until after the hill.

I should add that 4km/h is a minimum speed hard coded in the game to prevent vehicles from getting totally stuck when they cannot cope with the load, so if your horses are pulling a tram designed for horses up an ordinary one tile hill and are reaching 4km/h, there is something off with the physics. From my latest research on early trams, I suspect that the trailers are too heavy: the double deck trailer should probably weigh no more than 2t. I shall be enhancing the trams presently, so this should hopefully be fixed by the next pakset release.
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.

asaphxiix

very nice, thank you James!

I never realised the reason for vehicles stalling after the hill. Perhaps, vehicles could treat the hill in Simutrans as a longer, and proportionately to that, less steep incline than the (quite unrealistic indeed) 45 degrees in Simutrans?

That could be a very nice workaround, albeit somewhat unintuitive. However given the mechanism you described and drew above, it would make sense, wouldn't it?

jamespetts

If I understand you correctly, that is already what is done: the physics applied are consistent with an incline of much less than 1:1 (which does not exist on any railway or road of which I have ever heard: the 1:5 hill near my flat (on a road and former tramway) is probably about the steepest that one will ever get).
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.

asaphxiix

great :) I thought it might be but wasn't sure. What's the logic behind the gradualness? I see a two horse stage coach goes from 15 to 8 on the slope tile, then reaching the second tile after the slope at 11, the next at 14, and then 15, so that's 4 tiles I think for the slow down, and the calculated slope is average 1:4?

jamespetts

I cannot remember the figures off the top of my head, but the basic principle is that each tile of hill adds a certain amount in resistance, and each tile not on hill removes a certain (lesser) amount until the base level of drag for a level way is reached. Downhill tiles have a negative drag coefficient.
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.

kierongreen

Just a note here that standard slopes in simutrans are 22.5 degrees - shallow slopes are 11.25 degrees (for pak64 the new steep slopes are indeed 45 degrees).