Fast Forward speed depends on computer hardware?

Got a problem with OpenTTD? Find some help here.

Moderator: OpenTTD Developers

Post Reply
flp
Engineer
Engineer
Posts: 11
Joined: 02 Jun 2017 10:00

Fast Forward speed depends on computer hardware?

Post by flp » 25 Aug 2019 14:11

Hi forum,

after beating the OpenTTD speedrun WR (8 m 39s) in the category "1M pounds, default settings" with a time of 4 m 54s, a discussion started that using fast forward is unfair, because it depends on the hardware of the computer. Faster hardware, faster fast forward in OpenTTD (even using FF is NOT forbidden by the speedrun rules).

After i compared some speedrun videos, it really looks like that this is true, but the question is: Why? And is there a way to change it, that the fast forward speed is the same on every computer? Why isn't then the normal speed hardware depending?

Thank you for your answers.

User avatar
Redirect Left
Tycoon
Tycoon
Posts: 6577
Joined: 22 Jan 2005 19:31
Location: Wakefield, West Yorkshire

Re: Fast Forward speed depends on computer hardware?

Post by Redirect Left » 25 Aug 2019 15:55

My understanding is when you press Fast Forward, the games loop completes as fast as is possible on your CPU (on the single thread OpenTTD uses), the more active your map is, the slower it will become as there is more to do on each loop. If you start a new map and hit Fast Foward, you can tell by the days going past how fast it is going, compared to loading a saved game. When FF is turned off, the game regulates itself sensibly, and is in no rush to achieve anything.
It is possible to build so much that even in normal speed the game becomes slower, but you need a really busy map or a really poor CPU to achieve this on modern PCs I find.

I would recommend that anyone speed running openTTD in a serious manner is forced to not use Fast Forward, else whoever can build the fastest and has the best CPU is likely to win. Whereas on normal speed will be the same for everyone (assuming everyone has competant CPUs and the maps are not too big or too busy for that CPU)
Image
Worst Behaved IRC Member of 2008, 2009 & 2010 - Go Me!

User avatar
jfs
Director
Director
Posts: 562
Joined: 08 Jan 2003 23:09
Location: Denmark

Re: Fast Forward speed depends on computer hardware?

Post by jfs » 25 Aug 2019 16:19

Redirect Left is right. Fast Forward means "run the simulation as fast as the CPU is capable of", while normal speed is "30 milliseconds per simulation tick" (equaling 33.33 ticks-per-second), but the game may run slower if the simulation takes longer because of number of vehicles, map size, and so on.

It might be possible to add a "faster but still limited" mode, but it might depend too heavily on operating system specifics (timer accuracy, time slicing, and other scheduler details) to be entirely reliable between platforms. We already see this to a small degree. The Windows version of OTTD typically runs about 32-33 fps in singleplayer, while the Linux version will typically run 33-34 fps in singleplayer. This difference comes down entirely to some implementation details in how timers are used.

My suggestion for speedrunning purposes would be to go by in-game date instead of wall clock time, as that's independent of any machine configuration or slowdowns. Even better would be in-game game together with tick-of-day, but I'm not sure the vanilla game has a way to view that. (Each day in OTTD consists of 74 simulation ticks.) It might be possible to make a Game Script that will record the exact in-game completion time of the speedrun goal.

Post Reply

Return to “OpenTTD Problems”

Who is online

Users browsing this forum: No registered users and 2 guests