Are private servers limited to 1 tick/s?
-
I started my private server and it had 4 bots besides my own. Each tick was taking 1 second, I removed the other 4 bots and it still takes (suspiciously precisely) 1 second per tick. It seems artificially limited. Is it really limited? If so, is there a way to change this limit or disable it altogether and be limited only by the hardware?
-
There is a mod to adjust tick rate: https://github.com/ScreepsMods/screepsmod-tickrate
-
@eduter Definitely not haha. I have mine running at 5 ticks a second
-
Check the
tick-duration.js
file in theexample-mods
folder.
-
Im using the tick-duration.js on a linux server and it seems like it wont go any faster. Ive adjusted it to 5ms which should be fast as hell, since the server on my own pc runs fast enough on 20ms.
And the https://github.com/ScreepsMods/screepsmod-tickrate mod doesnt rally change it either.
50ms windows pc: https://streamable.com/omb0v
5ms linux root-server: https://streamable.com/2m962
-
An aside: be careful not to go too fast. The "cpu usage" is about 1 CPU = 1 ms execution, except for intents (Creep.build() is .2 CPU, but very little execution time, for instance), so it's entirely possible you are setting it faster than it can actually go.
With that out of the way, I can attest the tick-duration.js mod does work, and I've successfully set mine to 200ms ticks. You'll want to make sure the mod is loaded and getting called correctly. I don't know how you would do this off the top of my head, though.
-
It gets faster but it should go a lot more faster or at least at the same speed as the server on my pc.
-
the private server can only go as fast as the user scripts it's running. If you set the tick rate to 5ms, it will try to go that fast, but if your script takes 20ms, then that plus however long the processing between ticks takes, will be your actual tick rate. It gets even more prominent the more users you have, or the larger the map is.