Kehom / GodotAddonPack

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

[Network] - Method to "Cull" Objects #12

Open Kehom opened 3 years ago

Kehom commented 3 years ago

Provide means to selectively eliminate certain objects from the encoded snapshot, which could save some bandwidth.

fairhat commented 3 years ago

+1 ! Would this allow for example to not include other clients data if they are not visible to another client?

I think this feature should be as low level as possible to support a variety of use cases

Kehom commented 3 years ago

Yes, it would allow to simply not send that if the player is not visible to other players.

I already have an idea of how to implement it. It will be very generic as the system will basically call a function reference that should return true if the entity is to be culled and false otherwise (or the opposite, doesn't matter). In other words, game code will have full control over how this will work and, because of that, will be completely optional.

However, I simply didn't implement it yet because I need to see how to properly implement it so it does not "clash" with the delta snapshot compression system.