kripken / BananaBread

BananaBread is a C++ 3D game engine that runs on the web using JavaScript+WebGL+HTML
1.38k stars 346 forks source link

Multiplayer? #62

Open VinnyVicious opened 8 years ago

VinnyVicious commented 8 years ago

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?

Croydon commented 8 years ago

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.

kriekprinsloo commented 8 years ago

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

VinnyVicious commented 8 years ago

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

noahcoetsee commented 6 years ago

@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?

kripken commented 6 years ago

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).

noahcoetsee commented 6 years ago

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

Calinou commented 6 years ago

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.

noahcoetsee commented 6 years ago

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