BananaBread icon indicating copy to clipboard operation
BananaBread copied to clipboard

Get some gaming happening!

Open harry-wood opened this issue 10 years ago • 16 comments

I've tested this out a few times, walking around a solitary landscape, firing my weapon sporadically, but I've never had a multiplayer death-match with someone. The game is obviously intended for this, so how to make it happen?

I see options to create a game or join a game, but there's never any games to join. I'm guessing this is because there has never happened to be another person hanging around running a game at the same time as me. People like me stop by to experiment very occasionally but it's like ships that pass in the night.

First question: Am I understanding that situation correctly? Or I'm doing something wrong?

If it's too quiet on there to get some multiplayer happening, then I guess there's a sort of critical mass problem. The system is awesome and would attract more people to join in, but only if there's at least two people online.

What are the ideas to overcome that?

  • Option to receive an email or some other alert when someone's created a game on there.
  • A scheduled get-together. "The next death frenzy is at 12:00 UTC on January 31st"

harry-wood avatar Jan 30 '15 14:01 harry-wood

As far as I know there was a problem for a time in browser support and later a server problem, so you won't be able to see any other players. It should get indeed fixed, when people can actually play it there would be more interest in it.

Croydon avatar Jan 30 '15 18:01 Croydon

Yeah, originally this came out when only 1 browser had enough WebRTC support for it. Today there is much better support.

To see this take off, it would need someone to set up a new site (with new builds, etc.) and promote it to people, as I don't think anyone is still working on the current one or updating it.

kripken avatar Jan 30 '15 18:01 kripken

Do I get this right that you don't have access to the current demo site and that's why we need a completly new one?

Croydon avatar Sep 10 '15 14:09 Croydon

We just have a singleplayer version up currently, the multiplayer requires a WebRTC broker which we need someone to maintain.

kripken avatar Sep 10 '15 17:09 kripken

Is the broker code included in the release?

klaussilveira avatar Sep 17 '15 16:09 klaussilveira

Should be - @modeswitch?

kripken avatar Sep 17 '15 17:09 kripken

@kripken I will be the WebRTC broker if you are still looking to make this project a reality. I've been searching everywhere on the web and this is the one project that can efficiently run such a large WebGL game. It's so efficient (50 FPS on a ChromeBook), so I'd like it if I were able to continue it, but I have never used emscripten or Cube2 or Sauerbraten before so I'm curious what I need to know to continue this project.

noahcoetsee avatar May 16 '18 16:05 noahcoetsee

I don't have much time for this myself, but I'd be happy to help out. Yeah, if you're looking for a fast multiplayer first person shooter, this is a very good option I think. I'm biased though, been a Cube 2 fan for many years :)

What do you mean by "continue the project"? What specific goals do you have?

kripken avatar May 16 '18 22:05 kripken

I would like to complete the multiplayer functionality as well as some other Cube 2 features such as map modding. I have taken a quick little peek around the source files and I am not sure I completely understand where emscripten ties into all of this and that's what I was asking for clarification. I literally am unable to comprehend (for some reason) how this all ties together...

How readily available would multiplayer functionality be, anyways?

noahcoetsee avatar May 17 '18 00:05 noahcoetsee

Basically, BananaBread/Cube 2 multiplayer uses C APIs for UDP, in a library called ENet. Emscripten has support for those, that is, it implements them using browser APIs. Specifically, the websockets implementation is known to constantly work as we test it (even using ENet) in emscripten.

The "tricky" thing is that you need to run something like websockify for the server side, as browsers don't support normal TCP sockets. Emscripten has a networking test suite (containing ENet) where you can see this in known working configurations, see tests/test_sockets.py (runnable as python tests/runner.py sockets or for a single test python tests/runner.py sockets.test_enet for example).

WebRTC (UDP) worked in the past, but testing it in emscripten has gone stale and I'm not sure of the status there. But if someone that knows WebRTC looks into it, it's probably not hard to do.

kripken avatar May 18 '18 14:05 kripken

Hmmm.. Well, my area of expertise is WebSockets but I'm sure I can find someone with some experience in that area.... What previous implementation worked?

noahcoetsee avatar May 19 '18 20:05 noahcoetsee

Both WebSockets and WebRTC did work, and all the code is still in emscripten. The first thing to try is to just build the client and server and see if things work.

I would start with building the server natively and running it in websockify + building the client with websockets (which is the default). Later, can also test other configurations (the server compiled non-natively, WebRTC, etc.).

kripken avatar May 20 '18 01:05 kripken

Actually, even before doing any web stuff, I'd recommend building the client and server natively, and seeing that that works (it should, but just to be sure, plus to get a feel for things).

kripken avatar May 20 '18 01:05 kripken

Ok! So, I am just going to build the project and play around with it a tad?

noahcoetsee avatar May 21 '18 11:05 noahcoetsee

@FeaturedSpace any progress on this?

oxr463 avatar May 26 '19 22:05 oxr463

No, I've been busy with Uni, and I haven't worked out what I wanna do yet

noahcoetsee avatar May 27 '19 17:05 noahcoetsee