Razzeeyy / godot-networked-instancing-example

An example for semi-automatic instantiation and replication over network for Godot
MIT License
15 stars 2 forks source link

Ability to validate data #3

Closed Razzeeyy closed 5 years ago

Razzeeyy commented 5 years ago

There needs to be a way for server to validate and fix the received data in case there is a malicious client.

Possibly provide a validated signal that will run before replicated signal and will recieve the old_data and new_data variable and can modify/write to new_data to fix any discrepancies.

Possible caveates: need to be avare of time passed since last packet, also need to process packets on a per client base (in example not blend together elapsed time for packets from different peers).

Also was asked by https://github.com/Razzeeyy/godot-networked-instancing-example/issues/1#issuecomment-543095002

Razzeeyy commented 5 years ago

Added in version 0.4. See the cheating example.

TL;DR: https://github.com/Razzeeyy/godot-networked-instancing-example/blob/master/examples/cheating/avatar.gd#L32