Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rewrite multiplayer mode to WebRTC #177

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

not7cd
Copy link

@not7cd not7cd commented Apr 14, 2020

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

@not7cd
Copy link
Author

not7cd commented Apr 14, 2020

I got basic functionality of sharing cursor position. I will use previous work presented here https://github.com/muaz-khan/Canvas-Designer

@not7cd
Copy link
Author

not7cd commented Apr 14, 2020

I'm considering dumping FirebaseRTC in favour of socket server based on this repository https://github.com/kolson25/WebRTC-Multi-Peer-Video-Audio

@TheAwesome98-Real
Copy link

Multiplayer mode? Have I miss something?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants