Page 1 of 2

Posted: 08 Jun 2007 11:38
by Zojj
Ok I built my own performance meter for OpenTTD. My acceleration patch speeds up the game ~1 - 3%.

I got these numbers by playing #openttdcoop's savegame #9 (1300 trains), playing at 1024x768 middle-zoom, testing for 120 seconds.

ticks per second:

Code: Select all

          cur accel  new accel  diff
no cache  43.4       44.9       +3.4%
cache     71.4       72.2       +0.8%
diff      +64.5%     +60.8%     
I need to test this some more, as my accel changes train speeds a little. Slower trains = faster game.

Press the FF button to activate the performance meter.

Posted: 08 Jun 2007 11:57
by Nickman
The performance meter is cool :).
I'll give it a test run ;).

Posted: 08 Jun 2007 17:18
by skidd13
Zojj wrote:Ok I built my own performance meter for OpenTTD. My acceleration patch speeds up the game ~1 - 3%.

Press the FF button to activate the performance meter.
The problem is that your code (of the performance meter) is Microsoft based and does not work at my linux. :( Could you fix that please.

Posted: 08 Jun 2007 17:50
by Zojj
I don't have linux. =(

Code: Select all

SYSTEMTIME st;
GetSystemTime(&st);
int	cur_time = st.wHour * 3600000 + st.wMinute * 60000 + st.wSecond * 1000 + st.wMilliseconds;
Can someone convert that to compile on linux?

Posted: 08 Jun 2007 17:52
by skidd13
Why don't you use time.h instead? ;)

Posted: 08 Jun 2007 18:24
by Zojj
Time.h in windows doesn't do milliseconds. Can someone convert it? Or tell me how to use TIC() TOC()?

Posted: 08 Jun 2007 18:31
by Rubidium
TIC/TOC is not usefull for this purpose, unless you want to show the number of frames per cpu tick.

Posted: 08 Jun 2007 22:33
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 :)

Posted: 08 Jun 2007 23:41
by Zojj
lol thx

Re: Patch: simplified realistic acceleration

Posted: 08 Dec 2007 07:16
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. =)