Kehom / GodotAddonPack

A collection of pure GDScript addons for Godot
http://kehomsforge.com
MIT License
183 stars 15 forks source link

Network: Server tickrate #7

Closed fairhat closed 4 years ago

fairhat commented 4 years ago

is it possible to send the tickrate of the server without having to change the physics fps ? Because i'd like to still run on 60fps on server but sync with clients on a different ticks/second

Kehom commented 4 years ago

You mean, update the clients on different physics update settings? If that's the case, no, there is no way and to be really honest, I don't think it's a good idea. Even if the simulation is running at the "same" pace, the result will diverge, triggering corrections. If those are different paces, then things will go really problematic. The idea is to reduce corrections as much as possible because those frequently result in visual glitches on clients.

However, if what you want is to run the visual update at different pace (like VSync off), that is already supported. The smoothing nodes are used precisely to compensate for different paces between physics and idle (as called in Godot documentation).

That said, I do intend to provide an option for clients to specify the pace in which the data will be sent. So, even if the game is running at 60 frames per second, the data may be sent at 30 (or even less) snapshots per second. In this case obviously it will cap the maximum speed to the actual physics pace of the server.

fairhat commented 4 years ago

That said, I do intend to provide an option for clients to specify the pace in which the data will be sent. So, even if the game is running at 60 frames per second, the data may be sent at 30 (or even less) snapshots per second. In this case obviously it will cap the maximum speed to the actual physics pace of the server.

this. thx!