What is the default multiplayer server tick rate in Godot? How can it be manipulated? + More misc questions

Godot Version

4.3

Question

So I have a list of important question regarding Godot’s multiplayer. This is within the context of a multiplayer PvP, third-person shooter.

  1. What is Godot’s default server tick rate?
  2. How can this tick rate be manipulated?
  3. Can server tick be synchronized via a networked clock? Does it even need to be synchronized?
  4. What is the ideal tick rate range for a PvP third-person shooter?

I’m currently building a prototype, so this info will be really handy. Thanks in advance.

As far as I know, it uses upnp as default (built-in) which is not safe and also you need a router to create or connect to server in online. I did not know much about multiplayer, but I know its hard. I did not forced me to learn as I did not need it now.

So do you know these? Do you have proper setup with router.

Or maybe I am wrong somewhere… I have no idea on it, just have some experience.

Not to sound snarky, but if I knew, I wouldn’t ask. I have a few hypotheses, but no concrete knowledge yet.

1 Like

I don’t know of any ‘server tick rate’, it would probably have to be synchronized with the ‘physics_ticks_per_second’. (Default = 60)

physics_ticks_per_second Engine — Godot Engine (stable) documentation in English

2 Likes

This post is from 3 years ago:

1 Like

Alright, so it seems that the server ticks are determined how you program RPCs. If you put them in _physics_process, it will tick 60 times per second or a custom value.

So to control the tick speed, I just plug in my network sync functions into a process node.

I’ll figure out my last 2 questions, then edit them here.

Edit:

For question 3: It is very unlikely that server updates (ticks) need to by synchronized by an external system.

For question 4: The ideal tick rate for multiplayer PvP shooters is between 60hz and 120hz. 120hz is unnecessary and costs too much. I choose 60hz, as that’s the default _physics_process update rate.

1 Like

Regarding 3 and 4.
Tick rates can never be perfectly synchronized. You don’t need to synchronize tick rates but it’s useful if you want to do client side prediction. If you want client and server to run the same number of physics ticks you will want to adjust the tick rate regularly https://docs.godotengine.org/en/stable/classes/class_engine.html#class-engine-property-physics-ticks-per-second. The best way to do this is to adjust the client tick rate (either faster or slower depending on whether it is behind or ahead of the server). Unfortunately, Godot automatically updates _physics_delta whenever you change the fixed update rate. This is a problem because you don’t want physics/character bodies to move differently you just want to fix a slight desynchronization. In summary it is a little annoying/requires modifying Godot to properly adjust the physics frame rate.

As others have mentioned, there’s no such thing as a “server tick rate” in Godot. However, you will have movement code under _physics_process which is pretty similar. Do not bother changing the default physics rate unless you run into a CPU related performance issue (usually too many collisions per frame). You are very unlikely to run into such an issue unless you have 1000s of collisions.

1 Like

things like Cheat Engine has built-in speedhack, it vulnerable to it. Better to check amount of rendered frames in measured time period if it differ from certain multiplier so just disconnect the user

1 Like

Thanks for your responses, everyone. I marked the solution as an edit of an earlier comment.

1 Like