Is there a way to execute a game as fast as our computer allows it?? I want to do that for simulation purposes.
Thank you
Is there a way to execute a game as fast as our computer allows it?? I want to do that for simulation purposes.
Thank you
Changing timeScale does not execute anything faster or slower. It just scales the deltaTime value. Your game already runs as fast as it can if you have v.sync off. Otherwise you’re always bound to the refresh rate of your monitor. With a higher timeScale all your calculations that are based on deltaTime will just result in larger values.
So if you originally moved an object at 2 units per second, when setting timeScale to 100 you just will move 200 units per second. If you have a framerate of 60 fps you originally moved the object about 0.0333 units per frame. At a timeScale of 100 you will move your object by 3.333 units per frame. If you want certain things to be faster, just add your own scale value to it.
If you just need more simulation cycles you can simply call your simulation procedure several times per frame.
Just set the target framerate to a high number and make sure v-sync is set to 0.
If that is still too slow, get a faster computer