BananaBread icon indicating copy to clipboard operation
BananaBread copied to clipboard

Multiplayer?

Open VinnyVicious opened this issue 8 years ago • 8 comments

I was checking the following BananaBread roadmap: https://wiki.mozilla.org/HTML5_Games/BananaBread#Milestone_Two

And it says that multiplayer with WebRTC is complete. Unfortunately, i wasn't able to find any docs or examples of how to setup a BananaBread server and have clients connecting to it. Does anyone know where i can find them?

VinnyVicious avatar Dec 16 '15 11:12 VinnyVicious

See also #57 & #40.

And yes I agree, if there aren't enough information available it's hard to find somebody who is setting up a server.

Croydon avatar Dec 16 '15 12:12 Croydon

How do you set up a server? I could dedicate a machine probably to one if i know how.

kriekprinsloo avatar Dec 17 '15 00:12 kriekprinsloo

From what i could see, there's no dedicated server support. Only browser-based.

VinnyVicious avatar Dec 22 '15 15:12 VinnyVicious

@kripken Question: Is the engine in any way in a current state to have multiplayer compatibility? We have the websock.js but can we use it?

noahcoetsee avatar May 18 '18 12:05 noahcoetsee

In theory it should work - the engine and server use APIs that emscripten supports, and the emscripten test suite has ENet in it (which is what the engine uses).

However, we test ENet using websockets (TCP) and not WebRTC (UDP) (which was hard to test and browsers may have changed meanwhile).

kripken avatar May 18 '18 14:05 kripken

I believe Websockets are much more efficient, anyways... So, what do you propose for implementation?

noahcoetsee avatar May 19 '18 16:05 noahcoetsee

I believe Websockets are much more efficient, anyways...

Actually, WebRTC is more suited for real-time multiplayer games, since it can use unreliable communication (like UDP) whereas WebSockets are limited to reliable communication (like TCP), which suffers from higher overall latency.

Calinou avatar May 19 '18 16:05 Calinou

That's true. I've just got more experience with Websockets so I guess I feel more inclined to use them... LOL

noahcoetsee avatar May 19 '18 17:05 noahcoetsee