increase speed of the game

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
Bendanes
Engineer
Engineer
Posts: 2
Joined: 25 Jul 2016 09:21

increase speed of the game

Post by Bendanes »

Dear openttd developers,
dear openttd community,

I'm working on generation of data log from a running game, where any event could be recorded (transfer of cargopacket from a vehicle to a station, creation of cargopacket...). I'm looking for a way to make event generation much faster. That's why i'm triying to increase the speed of the game. For example, i modified the source code to decrease the duration of a tick (in the standard version, a tick=32 MS, i made it less than 1MS). But it's still not sufficient. Because the game takes time to update the windows.

So, is there a way to inactivate the update of the windows (graphical interface) ?


Also, if you have another ideas to increase the speed of the game, please share it


Cheers;
Bendanes
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: increase speed of the game

Post by Alberth »

Building a dedicated server version would work, you can run that in a headless environment.
Perhaps simpler, using the null video device might do the trick (check output of openttd -h for the options)

Otherwise, I think much of you speed problem arises from logging each single cargo packet. What would happen if you raise granularity to eg passing accumulated cargo once a day, once a week, or once a month?
Being a retired OpenTTD developer does not mean I know what I am doing.
User avatar
adf88
Chief Executive
Chief Executive
Posts: 644
Joined: 14 Jan 2008 15:51
Location: PL

Re: increase speed of the game

Post by adf88 »

Since "(svn r27579) -Change [FS#6402]: Performance improvement for dedicated servers by skipping drawing calls earlier in the process. (JGR)" it's probably better to run a so-called dedicated server. Note that by "building" Alberth meant "setting up", no need to recompile, just pass the -D option when running.
:] don't worry, be happy and checkout my patches
Eddi
Tycoon
Tycoon
Posts: 8267
Joined: 17 Jan 2007 00:14

Re: increase speed of the game

Post by Eddi »

the game has a "null" video driver that can run the game for a number of ticks at maximum speed (no need to modify the tick speed, works like "fast forward"), and then leaves the game.

use like "-v null:ticks=<blah>"
Alberth
OpenTTD Developer
OpenTTD Developer
Posts: 4763
Joined: 09 Sep 2007 05:03
Location: home

Re: increase speed of the game

Post by Alberth »

adf88 wrote:Since "(svn r27579) -Change [FS#6402]: Performance improvement for dedicated servers by skipping drawing calls earlier in the process. (JGR)" it's probably better to run a so-called dedicated server. Note that by "building" Alberth meant "setting up", no need to recompile, just pass the -D option when running.
No I meant recompiling, but the -D option is probably near 99% already.
Being a retired OpenTTD developer does not mean I know what I am doing.
Bendanes
Engineer
Engineer
Posts: 2
Joined: 25 Jul 2016 09:21

Re: increase speed of the game

Post by Bendanes »

With my modified version, i've tried the the following option "-v null" and it's worked very well for me! I've launched the game using the Windows command line with the following command "openttd.exe -v null:ticks=100000 -g myGameSave.sav". I've specified a number of 100000 ticks, and i've loaded the save "myGameSave.sav".

Thank you very much you really helped me :D
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 53 guests