Can SceneReplicationInterface
be made overridable?
#8591
Replies: 1 comment 3 replies
-
There are various reasons why You can think of it this way, MultiplayerAPI is like the PhysicsServer, while SceneMultiplayer is like GodotPhysics. If you can elaborate on your use case, I may be able to provide better feedback. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm working on a multiplayer game, where I'd like to only replicate objects to players within some detection range of them. It seems like I really only need to override
SceneReplicationInterface
, but to make this custom multiplayer implementation, my GDExtension needs to reimplementSceneMultiplayer
, as well asSceneCacheInterface
andSceneRPCInterface
. I could just copy these over wholesale from the multiplayer module, but that seems like a lot of duplication and maintenance overhead.In the initial proposal, #3459, @Faless wrote:
I assume this didn't happen because some of the functionality was split out and pushed up into
MultiplayerAPI
or intoMultiplayerSpawner
, which you can override as a whole. But what I want is essentially just whatSceneMultiplayer
does, but with finer control on which object replicates.I'd be happy to submit a proposal and a PR for this myself, but I'm not yet versed in Godot's C++ code enough to know what an idiomatic design for allowing such an override would be. I'd love some direction on the appropriate way to implement it. (Just something like adding a
SceneMultiplayer::set_replicator()
, or something more akin toMultiplayerAPI::set_default_interface()
?)Beta Was this translation helpful? Give feedback.
All reactions