Real-time multiplayer in a browser with node.js and HTML5 is a myth?

Started by
19 comments, last by user123456789 10 years, 2 months ago

Many routers are configured to prioritize tcp over any form of UDP


Every now and then, I hear this, but I have not seen any actual data or evidence of this being the case.
UDP is used for voice-over-IP, which is a large, important technology for the backbone carriers (that carry telephony and internet data interchangeably.)
UDP is also needed for DNS look-ups, which happen before most TCP connections even start; a slow DNS resolver is a more visible source of "slowness" to a user than almost any other reason!
I would be highly surprised if it was general behavior on the internet to drop UDP and favor TCP.
enum Bool { True, False, FileNotFound };
Advertisement

.

In HTML5 you have support for WebRTC which can go through UDP (or is it SCTP?) in Firefox (at the moment). Maybe check that out?

https://code.google.com/p/sctp-refimpl/

spinningcube

PS - It is something I am looking into myself, so quite interested

Hmm good point mate, however, that seems sort of a too far future to me when considering all the browsers people uses today (including mobile/tablet) ? we just got over the fact that websites doesn't need to work well at IE 6 anymore biggrin.png I don't even have Firefox installed, wouldn't this be same as using some another plugin in browser which could enable UDP (maybe unity?).. I mean that I am trying to look this thing from user point of view also - for me, browser based games is awesome because you can just navigate to a website and play. If you kill that idea, it is (almost) same to me than making some desktop app which you need to download. hehe.

I don't mean to be offending but this thing just crossed my mind smile.png if I continue programming games I might use WebRTC within few years from now.

-

.

.

OpenGL ES 2.0 compliant -> LLVM -> Emscripten -> Browser


FWIW, at work, we do just this for our newer and upcoming projects!
We actually have a C++ engine that targets native for mobile, and targets Emscripten for browsers.
There is a cost, both in development and runtime, for using Emscripten over using a native JS engine, but that cost is shrinking, and the cost of building two engines (one for native, one for JS) would have been *much* higher.
enum Bool { True, False, FileNotFound };

.

I sense the uncomfortable vibe this topic brings to some, and I have recently ran into this little video:

Charlie Crane: Game server development in node.js -- JSConf EU 2013

These good Chinese fellows are pretty much tackling this topic, in a serious scale. Open source, too. Great stuff. Video has some interesting statistics towards the end. I don't know any details, personally. Their code seems clean.

.

Super-dyanamic langauges like JavaScript (or PHP, or Python) can be highly productive while developing, but end up costing not only a bit of performance (a LOT for PHP, a little for JavaScript) but also in maintainability.
Check out this link, about how a single missing "var" statement ruined the launch of a product: http://blog.safeshepherd.com/23/how-one-missing-var-ruined-our-launch/
Sadly, all too common in JavaScript projects (although using jshint helps to some extent: http://jshint.com/ )
enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement