Kehom / GodotAddonPack

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

[Network] - Snapshot Rate #13

Open Kehom opened 3 years ago

Kehom commented 3 years ago

Allow clients to specify the rate in which snapshots will be sent, which could be at a lower pace than that of the simulation itself.

yuraj11 commented 3 years ago

This will probably require additional interpolation on clients, right? If yes I am thinking If this could be another subtask for this to do some default interpolation when using vector (position, rotation) and explicitly set flag to interpolate.

fairhat commented 3 years ago

This will probably require additional interpolation on clients, right? If yes I am thinking If this could be another subtask for this to do some default interpolation when using vector (position, rotation) and explicitly set flag to interpolate.

Maybe this already does the job? http://kehomsforge.com/tutorials/multi/GodotAddonPack/part04/

Kehom commented 3 years ago

This will probably require additional interpolation on clients, right? If yes I am thinking If this could be another subtask for this to do some default interpolation when using vector (position, rotation) and explicitly set flag to interpolate.

Reducing the snapshot rate that is sent to the client will only look good if the client side prediction is "doing its job". It should not result in additional interpolation since this is actually done only between physics updates (if at all - interpolation itself is not done by the network addon).

That said, the option to reduce the snapshot rate is a trade off. Because this setting can result in poorer experience to the player, when this feature get added I will include a suggestion that the game also provide this as something the player can modify in the settings window, making it very clear the trade off. Less bandwidth for a possible loss in the quality of the simulation. Note that if everything is re-simulated, the only agents that will probably look weird are player characters if the snapshot rate is too low.

yuraj11 commented 3 years ago

This would be useful together with culling to optimize bandwidth. BTW Is it currently possible to turn off delta updates for specific entity? Let's say I don't want delta updates for player entities.

Kehom commented 3 years ago

Currently there is no way to disable deltas for some specific entity types. I'm evaluating a few options to provide this feature.