train deceleration

Got an idea for OpenTTD? Post it here!

Moderator: OpenTTD Developers

Post Reply
User avatar
Wolf01
Tycoon
Tycoon
Posts: 2016
Joined: 24 Apr 2004 10:43
Location: Venezia - Italia
Contact:

train deceleration

Post by Wolf01 »

the train deceleration isn't realistic, the train still have full speed until reaches a red signal or a station, i suggest to let the train start to decelerate 2 or 3 squares before the stop, and to limit the velocity in the station (if the train stop at the station) when the train enter the station
Wolf01
User avatar
Purno
Tycoon
Tycoon
Posts: 16659
Joined: 30 Mar 2004 12:30
Location: Almere, The Netherlands

Post by Purno »

Yes, that's a very good idea, I like it. Especially fast trains do not decelerate realistic.
Contributor to the The 2cc Set and Dutch Trainset. Inventor of the Metro concept. Retired Graphics Artist.
Image Image
Download TT | Latest TTDPatch | OpenTTD | OpenTTDCoop | BaNaNaS: OpenTTD content system | 2048² OTTD scenario of the Netherlands
GRF Codec | GRF Crawler | GRF Maker | Usefull graphics & tools sites | NML Documentation Wiki | NFO Documentation Wiki
All my graphics are licensed under GPL. "Always remember you're unique, just like everyone else."
Bjarni
Tycoon
Tycoon
Posts: 2088
Joined: 08 Mar 2004 13:10

Post by Bjarni »

a nice idea, but you are not the first to get it. It is in the svn code, but it's broken. We have yet to find a formula to do it right. The next thing is to find a way to avoid the trains from passing red lights all the time
Psicho
Engineer
Engineer
Posts: 112
Joined: 27 Apr 2004 09:37
Location: Switzerland
Contact:

Post by Psicho »

The train speed deceleration really needs to be changed!
As Wolf01 said they should decelerate before in the stations,red signals
and entering depots.

And another thing, I would like to see the train decelerating in a more natural way when it goes on a climb.
Example:

If you have a climb of 3 tiles of heigth the train should do something like:

144 km/h getting to the climb
120 km/h at the 1 tile
100 km/h at the 2 tile
80 km/h at the 3 tile
144 km/h getting to the top of the climb
greetz,
Rasael
Steve2k4
Engineer
Engineer
Posts: 12
Joined: 10 May 2004 21:18

Deceleration formula

Post by Steve2k4 »

Here is an idea, written in code of course.

Code: Select all

bool slow_down;
int stop_dist, stop_count;

slow_down = check_stop(red_light,end_of_line,station);

if (slow_down == true)
{
  // Start slowing down at 5 squares or less
  for (stop_dist = 5; (stop_dist <= 5 && stop_dist > -1); stop_dist--)
  {
    if (Train.Location != stop_point) Train.Speed -= Train.Speed*(stop_dist/5);
    else Train.Speed = 0;
  }
}
That code just divides it, you could also do a countdown method aswell. With this code, I doubt it would look too funny with slower vehicles, but once you get into the planes & MagLev's, it just might seem choppy. It is all up to the Devs and the demand for it.

-Peace
Post Reply

Return to “OpenTTD Suggestions”

Who is online

Users browsing this forum: No registered users and 32 guests