The International Simutrans Forum

Development => Patches & Projects => Incorporated Patches and Solved Bug Reports => Topic started by: shingoushori on February 28, 2019, 11:40:52 AM

Title: Extend TOOL_CHANGE_GAME_SPEED, logarithmic control mode
Post by: shingoushori on February 28, 2019, 11:40:52 AM
Hello
Let me introduce the extension of  TOOL_CHANGE_GAME_SPEED, which is I made.
That's logarithmic control mode.

This operability is comfortable, to operate the game speed with a wide range.

This modify is assumed to be written in menuconf.tab as shown below, if used.
// # toolbar[0][31]=simple_tool[7],,.,+1
// # toolbar[0][32]=simple_tool[7],,COMMA,-1
toolbar[0][31]=simple_tool[7],,.,^+1
toolbar[0][32]=simple_tool[7],,COMMA,^-1

I hope you like it. Thanks for reading.
Title: Re: Extend TOOL_CHANGE_GAME_SPEED, logarithmic control mode
Post by: prissi on March 11, 2019, 12:00:17 AM
The "^" key has already a function in the data files (CONTROL). Maybe it would be more consistent to use the CONTROL key for logarithmic increases? ANd increase the fast forward speed in fast forward mode and the normal speed in formal mode?

For fast forward mode, we have already the variable env_t::max_acceleration. That holds the target acceleration.

Adding extra sync_steps in fast forward mode is a really bad idea, since it it slows down the fast forward a lot.
Title: Re: Extend TOOL_CHANGE_GAME_SPEED, logarithmic control mode
Post by: prissi on March 21, 2019, 01:59:29 AM
In r8727 allows to change the fast forward speed (in pak 64 with , and . ) when in fast forward mode.
Title: Re: Extend TOOL_CHANGE_GAME_SPEED, logarithmic control mode
Post by: shingoushori on March 22, 2019, 03:39:33 PM
r8727 is convenient I think ! Thank you for your considering.
And thanks for coming up with a natural extension that fits the design philosophy.

Quote from: prissi on March 11, 2019, 12:00:17 AMThe "^" key has already a function in the data files (CONTROL)
As reference, let me explain about this.
The "^" symbol applies to the normal speed in formal mode only, and it's not the key bind.
And it changes the array of possible values ​​of normal speed, for example [... 0.25, 0.5, 1, 2, 4, 8, 16 ...].
But I understood that this is my own preference... so I do not persist.
Title: Re: Extend TOOL_CHANGE_GAME_SPEED, logarithmic control mode
Post by: prissi on March 23, 2019, 12:17:01 PM
I  read this as agreement to move the thread to incorporated then ...