[patch] More realistic acceleration

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

Post Reply
jv_map
Engineer
Engineer
Posts: 1
Joined: 20 Aug 2015 19:58

[patch] More realistic acceleration

Post 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)
Attachments
more_realistic_accel.diff
git diff
(11.31 KiB) Downloaded 126 times
Eddi
Tycoon
Tycoon
Posts: 8258
Joined: 17 Jan 2007 00:14

Re: [patch] More realistic acceleration

Post 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.
User avatar
Wowanxm
Engineer
Engineer
Posts: 28
Joined: 09 Jul 2010 18:07
Location: Minsk, Belarus
Contact:

Re: [patch] More realistic acceleration

Post by Wowanxm »

It this patch dead? :?
User avatar
kamnet
Moderator
Moderator
Posts: 8548
Joined: 28 Sep 2009 17:15
Location: Eastern KY
Contact:

Re: [patch] More realistic acceleration

Post 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. :)
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 14 guests