Design + spike for high-level replication rebuild
Rebuild the multiplayer layer on stock MultiplayerSpawner/Synchronizer so adding an object to the game needs no networking code. MultiplayerSpawner only replicates node creation and deletion, so "sync everything regardless of what it is" has to come from a SceneReplicationConfig built by convention in code. NetReplication does that, giving every node two generated synchronizers: NetSync for script state (always server-owned) and NetXform for position (handed to whoever is holding the object). test/spike/ establishes the four engine behaviours the design rests on. Two are worth flagging: per-peer visibility CANNOT be used to stop the server fighting a client's held object, because MultiplayerSpawner despawns and respawns the node on every visibility flip; and set_visibility_for is only an override on top of public_visibility, so calling it alone does nothing. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
extends Node3D
|
||||
|
||||
## Spike fixture only. A plain scene with NO authored MultiplayerSynchronizer,
|
||||
## so the run proves the runtime-generated one is what carries the state.
|
||||
|
||||
var health: int = 0
|
||||
var label: String = ""
|
||||
var _private_should_not_replicate: int = 99
|
||||
Reference in New Issue
Block a user