Some more science:
A push will teleport a cart to the
beginning of the next tile (NOT the middle!) in one tick with 19990 speed, while a roller will accelerate a cart to roller speed, and it will start to accumulate regular track friction past the middle of the roller tile. So both propulsion methods start the minecart at the beginning of a tile, but not the same one.
So why do we see a minecart skipping over a pit when pushed?
Because some track features will affect a minecart when it is past the
middle of the previous tile: entering a ramp or a hole/drop and derailment checks are executed when the cart has left the middle of the previous tile, so with these track features a cart doesn't travel the usual ~100.000 distance units, but somewhere between 50.001-100.000, then the leftover distance of the tile will be added to the ramp that we enter, so on certain conditions the first ramp can be ~150.000 long, producing more acceleration then expected. Rollers also accelerate a minecart from the middle of the previous tile, and not from the beginning.
Then, when a cart leaves the ramps, it will emerge after one tick in the middle of the next regular tile, so it's entry coordinate is "50001-speed". That effectively means, that if we are going with 270.000 speed and exit the ramps the first regular tile that we enter will be 320.000 distance units long, and will start 2z levels above. That's dwarven relativity for you.
![Smiley :)](http://www.bay12forums.com/smf/Smileys/aaron/smiley.gif)
Additionally, there's a speed penalty of 4900 when exiting a long track ramp at high speeds, so you can only go with max speed on ramps, when entering a straight track you'll be ''only" travelling with 265000. The exact treshold of this penalty is to be tested.
All that's left to determine is how a minecart behaves on multiple ramps: distance unit calculations are totally different on them. What I could determine is that some kind of skipping over ramps is happening in the game, it looks like after accelerating past 160.000 speed the cart skips over every third ramp. This skipping behaviour also happens on regular tiles at high speed, meaning that you need to place your trackstops accordingly, otherwise the cart just flies past it. How skipping is determined, what's the underlying logic? Still to be resolved.
EDIT:
Here be some data dump from the game:
016-65.905400590001535400
016.29990.29990.29990.299959000153000
016.59980.29990.2999059000153000
016.89960.29980.2998-0.000159000153000
017.19930.29970.2997-0.000159000153000
017.49890.29960.2996-0.000159000153000
017.79840.29950.2995-0.000159000153000
018.09780.29940.2994-0.000159000153000
018.39710.29930.2993-0.000159000153000
018.63880.24170.2992-0.000159000152-100
018.884930.246130.34810.048959000152000
019.165630.28070.3970.048959000152000
019.480910.315280.44590.048959000152000
019.830760.349850.49480.048959000151-100
020.215190.384430.54370.048959000151000
020.63420.419010.59260.048959000150-100
021.087780.453580.64150.048959000150000
021.575940.488160.69040.048959000149-100
022.098670.522730.73930.048959000149000
022.655980.557310.78820.048959000148-100
023.247860.591880.83710.048959000148000
023.874320.626460.8860.048959000147-100
024.535360.661040.93490.048959000146-100
025.230970.695610.98380.048959000146000
025.961160.730191.03270.048959000145-100
Explanation for the 4th line:
016.89960.29980.2998-0.000159000153000
016: tile identifier
89960: distance units at exit point
29980: distance units travelled in a tick
2998: minecart speed at exit point, a zero is missing at the end...
-0.001: tile friction
59000153000: some id and shit, 153 means we are on z level 153, the 000 after 153 seems to indicate we are on a straight track without z level change in this tick, note the -100 at the end of lines of the ramps. A corner will also show -100 at the end, when skipping over a tile we see -200, so it may be a derail check indicator instead. The others are still a mystery.
So if you try to read this data:
016: medium speed roller - first line sets speed to roller speed, then comes 3 ticks while we travel on the roller, first 2 ticks are frictionless (until we leave the middle of the tile)
017-018: regular tracks
019-025: down ramps, last tick accelerates to 103270 speed
As you can see, distance calculations are fairly straightforward on straight tracks, we change tiles when the next tick would end on the next tile, the entry point of the next tile is the leftover distance. I have tons of data to confirm that this is true.
The important thing to notice is at line 11(last tick of tile 18):
018.884930.246130.34810.048959000152000
019.165630.28070.3970.048959000152000
if the next tile were a regular tile we would be at position 93800, but a ramp is coming, so we have downramp friction, and the distance calculations switch to ramp distance calculations, so the position is 884930. Also the distance units switch to something new, we read 246130. On the next tick we enter the first real ramp section, and the distance unit calculation is : 884930+246130=1165630 - so somehow it makes sense.
(Sometimes they don't add up, but I think that's something to do with the script, as it's a bit buggy, some ticks it cannot read at all, sometimes a zero is missing from a number.
![Sad :(](http://www.bay12forums.com/smf/Smileys/aaron/sad.gif)
Unfortunately I cannot fix it, but the read errors are easy to spot.)
I made some analysis of the distance units on the ramps, and the for the majority of the travel they increase with 34570/tick (280700-246130= 34570 But Whyyyyyy?). That's about all I could deduce.
I need some fresh ideas to continue.
Snaake, please tell me that you are reading this and have an idea!
![Smiley :)](http://www.bay12forums.com/smf/Smileys/aaron/smiley.gif)