Add flutter_scene_net and the Multiplayer example - #276
Merged
Conversation
flutter_scene_net binds dashwire replication to the scene graph. SceneReplication turns spawned replicas into nodes through per-type builders and detaches them on despawn; TransformReplica poses drive nodes through NetworkTransformComponent, which renders remote state through a short interpolation buffer (lerp/slerp over timestamped samples). SceneHost runs a Room plus a WebSocket listener inside the app on dart:io platforms, the listen-server topology, with an in-process loopback for the hosting player; a web stub keeps the same surface compile-clean in browsers. The Multiplayer example is a server-authoritative arena. One instance taps Host on this device (the HUD shows the LAN address to join), other instances or web builds enter the address and Join; WASD/arrow input replicates as an owner-authority field, the room integrates movement and pellet pickups, and scores flow back over onChange fields. The shared schema/simulation file is pure Dart so the same code can drive a headless server. The dashwire packages resolve through workspace-root path overrides until they publish.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
flutter_scene_net, the multiplayer integration that binds replicated state to the scene graph, plus a Multiplayer example in the example app.SceneReplicationmaps replicas to scene nodes through per-type builders, spawning and despawning nodes as the server dictates. Replicas that extendTransformReplicaget aNetworkTransformComponentthat interpolates remote poses a fixed delay in the past for smooth motion under jitter.SceneHostruns a room and WebSocket listener inside the app so a game can host from one device with a loopback self-join.The package depends on the newly published
dashwireanddashwire_replication.