Page 1 of 1

[patch] More realistic acceleration

Posted: 20 Aug 2015 21:05
by jv_map
Hi all!

I've just recently "discovered" OpenTTD, thanks to all contributors for making such an awesome open source game!

I decided to make this patch, as I wasn't quite happy with the existing realistic acceleration model. The acceleration distance of trains is extremely short compared to the train length and terrain features. Real trains need many kilometers to reach top speed.

This patch makes the acceleration distance of trains much longer. For example, a lone Maglev3 loc now needs about 180 tiles (or 11 km, see below why) to reach its top speed of 482 km/h. Furthermore power-to-weight ratio now matters a lot, even for level trips.

The patch takes effect when you choose the realistic acceleration model for trains and/or road vehicles.
The original acceleration model can still be chosen for trains and road vehicles and is not affected.
Ships and airplanes are not affected.
Save games are not affected.

While this patch has a strong effect on trains, road vehicles are barely affected. The reason is that the existing realistic acceleration model applied accelerations differently to road vehicles vs trains, making the same realistically computed acceleration value 4 times as effective for trains. So road vehicle acceleration was already more realistic than train acceleration :)

In this patch I've defined the size of a tile to be 60 meters, which matches reasonably well with the size of a stadium (2 tiles) or a railroad car (half a tile). Hence 180 tiles makes 11 km for the Maglev example above. I've introduced a separate time step for the physics simulation. This time step only controls the speed of the physics simulation, it does not influence acceleration distance. I set the time step to 150 ms = 5x real time.

I'm hoping to look more deeply into the issue of realistic deceleration distances and curve speeds some other time.

Give it a try and let me know what you think. 8)

Re: [patch] More realistic acceleration

Posted: 20 Aug 2015 22:29
by Eddi
jv_map wrote:In this patch I've defined the size of a tile to be 60 meters
i think you would serve more people's needs if you made this value configurable.

time and distance scales have all kinds of inconsistencies in this game, which you will never really resolve, but different people will have different opinions on which scales should match to improve their game.

for example, people who play 128x128 maps will probably want a different distance scale than people who play 4096x4096 maps.

Re: [patch] More realistic acceleration

Posted: 18 Mar 2017 20:23
by Wowanxm
It this patch dead? :?

Re: [patch] More realistic acceleration

Posted: 19 Mar 2017 03:45
by kamnet
Wowanxm wrote:It this patch dead? :?
The author has posted no more updates, and hasn't been here in a year and a half. But, source code is published, so it's only as dead so long as nobody else works on it. :)