Live data from Hacker News

QuakeJS – A Quake Port to JavaScript with Emscripten

quakejs.com

101–110 of 165 posts

Re: QuakeJS – A Quake Port to JavaScript with Emscripten

#101
post #97

My understanding is that action-oriented multiplayer games in browsers have always suffered because they can't use UDP. How does this achieve multiplayer from a networking perspective?

HTTP/2 with stream prioritization and server push kinda replaces the need for UDP. We can't allow UDP to be sent directly from browsers because that would enable any random bit of JavaScript you load to launch a DDoS attack.

HTTP/2 doesn’t replace the need for UDP at all, not in the slightest. For latency-sensitive applications, it provides no advantages over HTTP that I can tell.

The problem is with TCP, and the problem with TCP is that it prioritizes in-order delivery, and missed packets cause head of line blocking. HTTP/2 is designed to solve head of line blocking, but since it’s built on top of TCP, it can’t solve the issue in this case.

Re: QuakeJS – A Quake Port to JavaScript with Emscripten

#102

My understanding is that action-oriented multiplayer games in browsers have always suffered because they can't use UDP. How does this achieve multiplayer from a networking perspective?

Lots of people use WebRTC DataChannels for this! The real tech here is SCTP, and it is pretty amazing. It runs over UDP, and allows you to send messages larger than MTU. You can also choose ordered/unordered and lossy/non-lossy depending on what you are trying to do.

We worked on a Pure Go implementation[0]. If you are interested in learning more. Most people (all browsers) use libusrsctp the C implementation.

[0] https://github.com/pion/sctp

Re: QuakeJS – A Quake Port to JavaScript with Emscripten

#103
post #97

My understanding is that action-oriented multiplayer games in browsers have always suffered because they can't use UDP. How does this achieve multiplayer from a networking perspective?

HTTP/2 with stream prioritization and server push kinda replaces the need for UDP. We can't allow UDP to be sent directly from browsers because that would enable any random bit of JavaScript you load to launch a DDoS attack.

UDP was never "needed". It's been used in real-time applications because there are latency benefits to datagram protocols.

And browsers can indeed use UDP. WebRTC data channels are SCTP over DTLS, which is UDP based.

Re: QuakeJS – A Quake Port to JavaScript with Emscripten

#104
post #26

Quake's source code is very hackable. I forked ioquake3 for a personal project and it was surprisingly easy to add WebRTC support to the C codebase, so you could play it in your browser over WebRTC :)

That is really impressive! Are you still doing stuff with WebRTC? It is quite a niche area, but lets you do lots of interesting things.

If you are ever interested in getting back into the space you should come join us working on Pion (A Pure Go implementation of WebRTC). I would love to hear about what else you did! [0] I am just really trying to build a intellectually curious/supportive community of RTC. Right now everything is so anemic community wise.

[0] https://pion.ly/slack

Re: QuakeJS – A Quake Port to JavaScript with Emscripten

#107
post #41

I guess this is cool. Not a big fan of "port everything to the browser" though. I really don't want gaming to go any more in the direction of SaaS than it already is. There is already too much rent-seeking.

Where is the rent-seeking involved in this decision?

In the future, where every stupid little software program runs in the cloud, and private ownership of bits is history. My wallet dies by death from a thousand cuts and I have no ability to peek at game internals or tinker with data files

Re: QuakeJS – A Quake Port to JavaScript with Emscripten

#108

Disappointed to find out this is not Quake 1

Why? Quake III was the best Quake.

Hugely contentious statement. People still play the original Quake competitively. It's still one of the most thrilling and intense multiplayer FPS experiences. There aren't many games that are as fast or have a physics engine that can be so impressively manipulated.
Post reply on HN