Patch: simplified 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

User avatar
Zojj
Engineer
Engineer
Posts: 97
Joined: 27 Apr 2007 17:58
Location: Vegas baby
Contact:

Post by Zojj »

Time.h in windows doesn't do milliseconds. Can someone convert it? Or tell me how to use TIC() TOC()?
I'm on the Zoloft to keep me from killing yall

My patches: Better graphs - Train acceleration - Crash rates
Rubidium
OpenTTD Developer
OpenTTD Developer
Posts: 3815
Joined: 09 Feb 2006 19:15

Post by Rubidium »

TIC/TOC is not usefull for this purpose, unless you want to show the number of frames per cpu tick.
kaan
Route Supervisor
Route Supervisor
Posts: 399
Joined: 02 Apr 2007 20:13
Location: Nørup, Denmark

Post by kaan »

You might want to consider if you really meant that the patch was made for r1051?
I think that it might be safe to bet that you really meant 10051 :)

Code: Select all

if (YouAreHappyAndYouKnowIt) {
    ClapYourHands();
}
User avatar
Zojj
Engineer
Engineer
Posts: 97
Joined: 27 Apr 2007 17:58
Location: Vegas baby
Contact:

Post by Zojj »

lol thx
I'm on the Zoloft to keep me from killing yall

My patches: Better graphs - Train acceleration - Crash rates
User avatar
Zojj
Engineer
Engineer
Posts: 97
Joined: 27 Apr 2007 17:58
Location: Vegas baby
Contact:

Re: Patch: simplified realistic acceleration

Post by Zojj »

I'm gonna split up my acceleration patch, cuz it has some good parts and some controversial parts.

This patch improves the curve, depot, and station speed limit code. The behavior is identical except for one difference: Trains are no longer slowed by successive S bends.

I have also left in the code (but commented out) 3 options that I think make sense:
-Trains' max speed is limited while inside a station, the same manner as while inside a depot but faster.
-Faster railtypes have faster speedlimits while inside a station; a monorail train can enter faster than an electric train.
-Faster railtypes have faster speedlimits while inside a depot. Maglevs enter at 151kph.

The current code is obfuscated, I really want to fix it. =)
Attachments
curve_speed_limits_r11596.patch
(6.53 KiB) Downloaded 187 times
snake.png
snake.png (8.51 KiB) Viewed 2303 times
I'm on the Zoloft to keep me from killing yall

My patches: Better graphs - Train acceleration - Crash rates
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 2 guests