Rewrite multiplayer mode to WebRTC#177
Draft
not7cd wants to merge 6 commits into
Draft
Conversation
Author
|
I got basic functionality of sharing cursor position. I will use previous work presented here https://github.com/muaz-khan/Canvas-Designer |
Author
|
I'm considering dumping FirebaseRTC in favour of socket server based on this repository https://github.com/kolson25/WebRTC-Multi-Peer-Video-Audio |
|
Multiplayer mode? Have I miss something? |
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.
There are unwanted changes in index.html.
This approach still uses Firebase, but changes its role to only act as signaling. All drawing activities should be handled by WebRTC.
This would mean a major overhaul of how sessions are handled.
Proposed architecture
mesh connection:
every client will communicate its local state like cursor position and if its a host
start connection:
host establishes stream to every connecting remote to send them the canvas
if host leaves, peers decide which one of them takes host status and host establish new stream to other peers.
for MVP host should be able to edit the canvas, while clients can send changes that are applied by host