15 ms·
WebRTC: the future of web games
- k__ 10y agoTo the security people here. I like the idea of P2P and UDP for better latency. But how dangerous is this?
- omginternets 10y agoAll I know (and this may not be relevant to you) is that WebRTC (can? will?) bypass Tor.
- k__ 10y agoAll I read was that it can directly connect two PCs, even if they are behind a NAT, which sounded like a cool idea at first. But having random sites doing this, didn't feel right to me.
- MichaelGG 10y agoThe real issue is that WebRTC ignores your proxy settings. This is obviously incorrect behaviour. Also there's no reason to allow silent P2P connections.
- cjbprime 10y agoIf you're thinking of the bug that exposed private IP addresses to the browser, it was fixed years ago.
- pmontra 10y agoIt's not fixed, see your addresses at https://www.privacytools.io/webrtc.html https://www.privacytools.io/webrtc.html
- pthatcherg 10y agoIf you want to force all traffic through a proxy, you must enable it using an extension, such as this one: https://chrome.google.com/webstore/detail/webrtc-network-limiter/npeicpdbkakmehahjeeohfdhnlpdklia https://chrome.google.com/webstore/detail/webrtc-network-lim...
- lallysingh 10y agoThere isn't a solid UDP proxying story for browsers, generally.
- omginternets 10y agoIs there a technical reason for this?
- ronsor 10y agoYes: it's not possible. Neither Socks(Tor) nor HTTP proxies forward udp. Only VPNs - which is an OS-level configuration (normally anyway)
- man5quid 10y agohttp://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/ http://gafferongames.com/networking-for-game-programmers/wha... A great series for you to read. tl;dr Udp is good. client to client sessions are terrible over the internet.
- k__ 10y agoA nice. Didn't know that. But makes sense. In the WebRTC case, the server could simply be a "peer" too :)
- zurn 10y agoThe P2P case this article discusses is "peer-to-peer lockstep", which is only a small subset of possible p2p systems. (it's called peer-to-peer instead of client-to-client, because there is no client role in such a system).
- jaypaulynice 10y agoI think WebRTC is secure by default and everything is supposed to be encrypted and served over https...Chrome for example doesn't allow unsecure usage of the API's. See this for more: http://webrtc-security.github.io http://webrtc-security.github.io
- pmontra 10y agoI'm still blocking it with https://github.com/ChrisAntaki/disable-webrtc-firefox https://github.com/ChrisAntaki/disable-webrtc-firefox because it leaks the local IP addresses of the client over VPNs. Yes, addresses because there can be many of them at the same time, so it's useful for fingerprinting. Check your ones at https://www.privacytools.io/webrtc.html https://www.privacytools.io/webrtc.html I really don't know why the local IP addresses must be known to the server, maybe there are good technical reasons, but it's not OK.
- tokenizerrr 10y ago> I really don't know why the local IP addresses must be known to the server, maybe there are good technical reasons, but it's not OK. So they can pair you with other clients sharing a local network with you? This allows the client to talk peer to peer over their LAN which is extremely valuable.
- pmontra 10y agoThe public address could be enough for the server to realize there are two browsers from the same LAN. Then it tells the browsers to look for each other. I'm not really sure that it is practical with large LANs (a /16) but it doesn't look impossible. If they design for privacy they could develop an algorithm that works. And if I connect with a VPN I probably don't want to bypass it. I've got customers that accept unconveniences to protect their network with VPNs. Should browsers break it with WebRTC? I didn't think so. It's a vulnerability that I keep blocked.
- tokenizerrr 10y ago
- flamedoge 10y agoGames usually require central authoritative server for low latency and preventing cheating
- banachtarski 10y agoJust read the docs. WebRTC data channels are SCTP which is built on DTLS (datagram transport layer security) which uses the identical algorithm as TLS for encrypting traffic. It's as secure as TLS is, and hopefully you're using 1.2 or so.
- fulafel 10y agoWhat aspect are you worried about? In terms of plain and direct security holes in WebRTC, there is an extended attack surface. But your browser has this enabled anyway, no matter what you as an application developer or end user do. In terms of security properties delivered to the application/end user, there are security and privacy advantages in end-to-end communication instead of involving servers. But it all depends on your use case and threat model.
- yeldarb 10y agoI haven't looked at WebRTC in a while but what's the compatibility of data channels nowadays? Does it finally work on mobile?
- kosinus 10y agoWorks fine on Firefox and Chrome, on all systems except iOS. (On iOS, all browsers are Webkit shills.) Safari currently lacks support everywhere. http://caniuse.com/#feat=rtcpeerconnection http://caniuse.com/#feat=rtcpeerconnection
- AshleysBrain 10y agoWe've been using WebRTC Datachannels for multiplayer gaming in the browser in our game editor Construct 2 (www.scirra.com) for a couple of years now. Generally they work great! However the main problem we have is switching tab suspends the game, which if you're acting as the host, freezes the game for everybody. This is really inconvenient. There ought to be some way to exempt tabs with WebRTC connections from being suspended. I filed a bug for it here: https://bugs.chromium.org/p/chromium/issues/detail?id=676036 https://bugs.chromium.org/p/chromium/issues/detail?id=676036
- jczhang 10y agoAre you using any libraries to simplify the initial handshake connection or Socket.io?
- AshleysBrain 10y agoNo, we run our own signaling server and wrote the connection establishment parts ourselves. The client ends aren't that complicated in that regard.
- taf2 10y agoWait can you do a pop out window? That way it's always open and can't have multiple tabs. The main tab can control the pop out to kill the data channel ...
- AshleysBrain 10y agoMinimising still suspends. And IMO pop-ups are slightly user hostile compared to just staying in the tab.
- ilaksh 10y agoHave you tried popping up a message in other browsers saying 'userBob switched browser tabs, disabling his host. Please contact userbob to switch back and always remeber if you are the host, dont switch tabs.' Then it would only happen when people were trying to be hostile or negligent. Also have you tried with a webworker or something similar.
- trevyn 10y agoInteresting. What are the server-side software options for hosting bandwidth-intensive WebRTC data channels?
- getkey 10y agoOn Node.js you have https://github.com/js-platform/node-webrtc https://github.com/js-platform/node-webrtc and https://github.com/vmolsa/webrtc-native https://github.com/vmolsa/webrtc-native which are a bit unstable, or https://github.com/mappum/electron-webrtc https://github.com/mappum/electron-webrtc which works fine but requires running an Electron process.
- kenOfYugen 10y agoHaven't tested it yet, but OpenWebRTC [1] has been on my radar for some time now. 1. https://github.com/EricssonResearch/openwebrtc https://github.com/EricssonResearch/openwebrtc
- lalaland1125 10y agoYou can directly use the official WebRTC libraries (https://webrtc.org/native-code/development/ https://webrtc.org/native-code/development/). https://github.com/Lalaland/DataChannelServer https://github.com/Lalaland/DataChannelServer is a wrapper I worked on last summer to make it a bit easier (not complete by any means, but it at least gives you a sense of how the API works).
- vvanders 10y agoLast I looked at WebRTC it fell back to TCP if it couldn't open a UDP session which means it's fairly useless as a game protocol. Is that still the case or do the guarantee a non-blocking protocol?
- ARCarr 10y ago"Fairly useless" Depends what kind of game you're making.
- nitwit005 10y agoIf you need UDP, and a UDP connection can't be set up, aren't you screwed regardless?
- stcredzero 10y agoIf you've designed your protocol, such that you're sending packets smaller than 1.5k (or better 572 bytes) then over a really good connection, TCP will perform like UDP, or close enough in any case. With modern 1st world broadband (which doesn't include all of the US, unfortunately) you just want UDP to minimize that fraction of the populace that gives you a 1-star rating and says your game sucks because their network sucks. The big difference comes in with packet drops. TCP, with its delivery and order guarantees, will cause huge outliers in latency. Even when those outliers are rare, they will make your game look completely janky. With good broadband, those outliers will be very, very rare, and the game will look good.
- vvanders 10y agoIt's not just packet drops and MTU, you also have congestion control, Nagel algorithm and a host of other things working against you in a TCP connection. You're trying to turn a stream protocol into a message based protocol and you're going to experience an impedance mismatch if you try to use the wrong protocol for your use case.
- stcredzero 10y ago
- azurelogic 10y agohttp://iswebrtcreadyyet.com/ http://iswebrtcreadyyet.com/
- nickthemagicman 10y agoIs Safari the new Internet Explorer?
- lilactown 10y agoYes.
- ReverseCold 10y agoIt's really all over the board. Some things are in Safari Tech Preview that even chrome doesn't have (some new JS stuff) - and others are like this.
- nickthemagicman 10y agoAny news on them and web assembly? That's going to be a huge problem if they don't support it and everyone else does.
- est 10y agoNo, everything non-Chrome is Internet Explorer. Oh wait...
- nickthemagicman 10y agoHaha I love where your heads at
- EGreg 10y agoWhen they implement Service Workers and Web Push they will maybe catch up slightly.
- azurelogic 10y agoIt's hard to say this. On the one hand, they're totally missing out on extra features like WebRTC. On the other hand, they're the only browser with 100% ES2015 shipping and 100% ES2016+ complete in dev. You can beat on them for missing the bonus questions, but they're the only one answered all of the questions on the main exam correctly and they were the first ones done... https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es6/ https://kangax.github.io/compat-table/es2016plus/ https://kangax.github.io/compat-table/es2016plus/
- fredliu 10y agoGreat article. Does anybody have any experience using WebRTC out of the browser context? E.g. using Android's webRTC lib without using a browser?
- emcpoland 10y agoHave experience using it as a VoIP app. The main issue with it, is that there's constant regressions, with no real stable version. For example if a new Android device comes out you can run into issues regarding gain and echoing, they also maintain a list of pecular devices which don't strictly adhere to standards (Mostly Samsung devices). So you end up having to upgrade to a later version. Which ends up causing regressions in many other devices which previously had no issues. I am ofcourse talking about Google's WebRTC. The best thing to a stable version, is the commit hash used in chrome, but they have just as many regressions as any other version. Building it is also a bit of a pain, although no where near as bad as it used to be, but once it's set up it does the job quite well.
- bennyg 10y agoI second this. Building it used to be an absolute clusterfuck (for iOS). You still need Linux to build for Android.
- fredliu 10y agoInteresting, I'm aware of the hassle to build it, but constant regression...that means it's not production ready yet. Regarding the same regression in Chrome, does it mean the WebRTC in stable version of Chrome also has the same compatibility/gain/echoing problems with new android devices?
- emcpoland 10y agoYeah, there are frequent regressions in Chrome. Although Ive never had personal experience of them in the browser, but Ive used the same commit hash, and tickets Ive come across also tend to refer to the browser. Most of the issues I have come across are device specific. Sadly I believe its as production ready as its ever going to be, they seem to be taken the motto of "move fast and break things". The issue isn't the project, its the carefree way that its being handled.
- amelius 10y agoSomewhat related: is there a good open source video conferencing webrtc library written in JavaScript yet?
- reitanqild 10y agoLinked from the article: - https://talky.io https://talky.io (commercial) - https://simplewebrtc.com/ https://simplewebrtc.com/ (mit licensed)
- rayboy1995 10y agoI picked websockets and socket.io for our web game: https://rocketblitz.com/ https://rocketblitz.com/ When I started development WebRTC wasn't very well supported, now I am considering using a hybrid. I already use two websockets, one for binary state snapshots and the other for JSON important updates like entity creation and chat. It would be interesting to implement WebRTC to my servers just for the state snapshots.
- shurcooL 10y agoI have to warn you though, the server-side WebRTC libraries are not very mature yet. I advise you to do thorough research before building your game. Are there any good server and/or client WebRTC libraries written in Go yet?
- shazow 10y agoI've been using https://github.com/keroserene/go-webrtc https://github.com/keroserene/go-webrtc for a couple of prototypes, it's not pure-Go but bindings against the C++ implementation but it works (what little of it that is exposed).
- pthatcherg 10y agoThere was a discussion about this on go-nuts: http://grokbase.com/t/gg/golang-nuts/161wbn1vf0/go-nuts-native-go-implementation-of-webrtc-any-interest-in-such-a-project http://grokbase.com/t/gg/golang-nuts/161wbn1vf0/go-nuts-nati... There are two bindings for Go built on top of the WebRTC code at webrtc.org: https://github.com/keroserene/go-webrtc https://github.com/keroserene/go-webrtc https://github.com/fd/webrtc https://github.com/fd/webrtc By the way, I work on the WebRTC team at Google, and I don't think it would be that hard to write a data channel server in Go. Here's how you should do it. 1. Get an "SDP offer" from the client. Parse it mainly to get the DTLS fingerprint. You may also choose to get the SCTP max message size. 2. Open a UDP socket. Listen for incoming STUN binding requests and send back binding responses: You can see how the WebRTC client code constructs requests here: https://cs.chromium.org/chromium/src/third_party/webrtc/p2p/base/port.cc?sq=package:chromium&dr=CSs&rcl=1482855583&l=755 https://cs.chromium.org/chromium/src/third_party/webrtc/p2p/... You can see how the WebRTC client code processes responses here: https://cs.chromium.org/chromium/src/third_party/webrtc/p2p/base/port.cc?sq=package:chromium&dr=CSs&rcl=1482855583&l=363 https://cs.chromium.org/chromium/src/third_party/webrtc/p2p/... Or you can read the RFC (warning: not light reading): https://tools.ietf.org/html/rfc5245 https://tools.ietf.org/html/rfc5245 3. Once a valid STUN binding request is received, listen for DTLS packets and hand those over to BoringSSL. Also listen to when BoringSSL wants to send a packet and send those out on the UDP socket back to the client. You can see how the WebRTC client code passes DTLS packets down to BoringSSL here: https://cs.chromium.org/chromium/src/third_party/webrtc/base/opensslstreamadapter.cc?cl=GROK&rcl=1482855583&l=221 https://cs.chromium.org/chromium/src/third_party/webrtc/base... You can see how the WebRTC client code gets packets to send from BoringSSL here: https://cs.chromium.org/chromium/src/third_party/webrtc/base/opensslstreamadapter.cc?cl=GROK&rcl=1482855583&l=239 https://cs.chromium.org/chromium/src/third_party/webrtc/base... 4. Once BoringSSL finishes the DTLS handshake and is processing incoming SCTP packets, listen for those and hand those over to usrsctplib. Also listen to packets usrsctplib wants to send and hand those over to DTLS to send. You can see how the WebRTC client code reads decrypted packets from BoringSSL here: https://cs.chromium.org/chromium/src/third_party/webrtc/base/opensslstreamadapter.cc?cl=GROK&rcl=1482855583&l=647 https://cs.chromium.org/chromium/src/third_party/webrtc/base... And how it passes them down to usrsctplib here: https://cs.chromium.org/chromium/src/third_party/webrtc/media/sctp/sctpdataengine.cc?q=sctpdataengine&sq=package:chromium&l=702 https://cs.chromium.org/chromium/src/third_party/webrtc/medi... You can see how the WebRTC client code gets packets to send from usrsctplib here: https://cs.chromium.org/chromium/src/third_party/webrtc/media/sctp/sctpdataengine.cc?sq=package:chromium&rcl=1482855583&l=254 https://cs.chromium.org/chromium/src/third_party/webrtc/medi... And how it passes them to BoringSSL here: https://cs.chromium.org/chromium/src/third_party/webrtc/base/opensslstreamadapter.cc?cl=GROK&rcl=1482855583&l=583 https://cs.chromium.org/chromium/src/third_party/webrtc/base... 5. Process data channel messages from usrsctplib and send data channel message through usrsctplib. Note that you can ignore the whole "OPEN message" protocol if you call PeerConnection.createDataChannel with the "negotiated: true" option on the WebRTC client side. You can specify the SID you want to use for the data channel as well. You can see how the WebRTC client code passes messages to usrsctplib here: https://cs.chromium.org/chromium/src/third_party/webrtc/media/sctp/sctpdataengine.cc?sq=package:chromium&rcl=1482855583&l=666 https://cs.chromium.org/chromium/src/third_party/webrtc/medi... And how it receives them: https://cs.chromium.org/chromium/src/third_party/webrtc/media/sctp/sctpdataengine.cc?sq=package:chromium&rcl=1482855583&l=428 https://cs.chromium.org/chromium/src/third_party/webrtc/medi... https://cs.chromium.org/chromium/src/third_party/webrtc/media/sctp/sctpdataengine.cc?sq=package:chromium&rcl=1482855583&l=214 https://cs.chromium.org/chromium/src/third_party/webrtc/medi... 6. Serialize an "SDP answer" message which basically just hands back the same looking blob of text, but with a different DTLS fingerprint (the one for the certificate of the server). It also must have two random strings: the ICE username fragment (ufrag) and ICE password (pwd). If you pass that answer to the WebRTC client, all the ICE, DTLS, and SCTP work should happen and after around 6 round trips on the network, you should incoming and outgoing messages. Ok, that probably sounds like a lot, but most of the work is done by BoringSSL and usrsctplib. The bulk of the Go code would be implementing the STUN messages and gluing everything together. Good luck to whoever tries :).
- latenightcoding 10y agoToo bad the API is an absolute mess, I worked on a WebRTC application 2 years ago and it was a nightmare.
- mfukar 10y agoThat was my experience as well. An underdocumented mess.
- bratsche 10y agoCan you tell us about any of the problems you experienced?
- latenightcoding 10y agoI just remember it was a nightmare to get it working in both chrome and firefox, the tutorials were outdated, the official docs at w3.org were wrong (suggested settings would break the app), error handling was not consistent, lots of race conditions, API was too complex and awkward, etc.
- cpncrunch 10y agoTry shane tully's example code. Its simple and works well. https://shanetully.com/2014/09/a-dead-simple-webrtc-example/ https://shanetully.com/2014/09/a-dead-simple-webrtc-example/
- pthatcherg 10y agoWhich API? PeerConnection? Would you prefer an API like ORTC?
- latenightcoding 10y agoI never got to try ORTC, a co-worker mentioned it at some point.
- bluetwo 10y agoAm I wrong in thinking this will shortly kill Adobe Connect, WebX, Chat Roulette, IRC, every other messenger platform out there?
- duskwuff 10y agoYes, you are wrong in thinking that. :) WebRTC is a technology. It is not an application, and cannot replace applications. In the cases of some of those applications, it could conceivably be used to implement future versions of those applications -- but that certainly doesn't equate to "killing" them.
- bluetwo 10y agoOK, thanks. :) I wasn't saying that it would kill them out of the box. I am thinking that those application rely of a heavy dose of proprietary technology in order to pull off their magic, and WebRTC is going to enable countless competitors to arise with much less investment in tech. In the long run, this tends to kill off established applications.
- tokenizerrr 10y agoIRC? Proprietary technology?
- bluetwo 10y agoYou might be missing the point here.
- tokenizerrr 10y ago> I am thinking that those application rely of a heavy dose of proprietary technology > IRC https://tools.ietf.org/html/rfc1459 https://tools.ietf.org/html/rfc1459
- 10y ago
- Matheus28 10y agoI'm the guy that made Agar.io, Diep.io and a few smaller games. I analyzed the possibility of using WebRTC in my games several times so far, but it seems that right now, it's still hard to use in a server-client architecture. You need to bring this [1] behemoth and all of its dependencies to your project dependencies on the server side, even though you only care about a tiny bit of it (unreliable data channels). It's unlikely that people will start using it until there is an easy stripped-down version that only deals with data channels. [1] https://chromium.googlesource.com/external/webrtc https://chromium.googlesource.com/external/webrtc
- pthatcherg 10y agoHi, I'm a member of the WebRTC team at Google, and I wrote a lot of the data channel and network code that's part of that behemoth. I'm glad you got this to work :). I've always hoped someone would do exactly what you've done (use the data channel code on a server to do low-latency client<->server communication). We're aware of the difficulty and are actively working on making it easier to work with just he components you need for data channels (ICE, DTLS, and SCTP). It might take a while, but it's one of our goals.
- shazow 10y agoI've been trying to find some numbers on what kind of performance characteristics for using WebRTC unreliable datachannels (compared to the spectrum between pure UDP vs WebSockets). Do you know of any such comparisons? Or any intuition on the matter?
- comboy 10y agoWhere does the low latency in WebRTC come from? Is it just packet ordering in TCP or is there something more to it?
- Franciscouzo 10y agoYou can't do packet reordering on top of TCP as it is already ordered, RTCDataChannel uses SCTP instead.
- browseatwork 10y agoMy coworker (a mobile game developer, currently working on a web game), says: I don't think WebRTC is ready yet for games, too much complexity on the server side. Instead, he's using websockets for his web game. Disclosure: we work for a WebRTC company.
- kLeeIsDead 10y agoHeh, the web. The only platform where it's considered normal to use elaborate workarounds for problems that have been solved decades ago
- legulere 10y agoBut also the only platform where you can run arbitrary code without having to fear it take over your computer or steal all your data on your computer.
- 234dd57d2c8db 10y agohttp://venturebeat.com/2016/03/18/pwn2own-2016-chrome-edge-and-safari-hacked-460k-awarded-in-total/ http://venturebeat.com/2016/03/18/pwn2own-2016-chrome-edge-a... ????????? Also what is XSS?
- kuschku 10y agoNah. The same is possible on phones – the "put every program in a container, and restrict access to any hardware or files" allows exactly that.
- JepZ 10y agoAnd the only platform which everyone still uses :P ;-)
- Klathmon 10y agoAnd the only platform that works on my windows desktop, macbook, work Linux machine, Android phone, iOS tablet, Xbox, TV, and watch with an "install time" measured in seconds, a top of the line security sandbox system that takes very little effort from the user to configure correctly, a very visible badge telling you if the connection is encrypted or not, and an incredible amount of easy customization by the user which is so powerful it can completely change how an app looks with zero input or permission from the app creator.
- deleted 10y ago[deleted]
- jkochis 10y agoGreat article and the WebRTC framework linked to looks great. While my comment isn't exactly 'on-topic', I would like to encourage the author to find an alternative to using slave-related terminology.
- tokenizerrr 10y agoJust stop.
- jkochis 10y agoI should've known better than to bring this up in a thread concerning gaming.
- jkochis 10y agoFWIW: https://blog.mozilla.org/blog/2015/12/10/mozilla-open-source-support-first-awards-made/ https://blog.mozilla.org/blog/2015/12/10/mozilla-open-source...
- tokenizerrr 10y agoYou should have known better than to bring this up at all. It's ridiculous and a non-issue.
- jkochis 10y agoI think there's room for discourse in this area TBQH. There are many alternative terms that would communicate the purpose of the framework and its class members just as well, if not better than something with 'slave' or 'enslave' in the name. Especially if you want to potentially attract adoption among users who might have ancestors who were enslaved, and also incidentally have a harder time getting a job in tech. I know I for one would like to use a software package that doesn't also remind me of a painful memory.
- tokenizerrr 10y ago
- waspleg 10y agoabout:config -> media.peerconnection.enabled -> false about:config -> extensions.pocket.enabled -> false https://www.perfect-privacy.com/webrtc-leaktest/ https://www.perfect-privacy.com/webrtc-leaktest/ The first 2 things I do with every Firefox install. Keep your spyware off my box, thanks.
- mrfusion 10y agoI didn't follow the nat traversal part.
- getkey 10y agoWhen a game server connects to the master to be registered, what the master gets is the the IP address relatively to it. If this address happens to be accessible from a client, everything's fine. However in some cases, it is not. For example in the case described where 127.0.0.1 is the game server's address (relatively to the master), if the master sent the address 127.0.0.1 to a client, it wouldn't connect. So we need to find out the public IP address in some cases, but sometimes it is better to use the local IP address (for example if the master, the game server and a client are on the same network and the client is not allowed to access the internet). So basically finding out which IP address the master must send to the client is a huge pain. WebRTC does it automatically (to traverse NATs).
- ndesaulniers 10y agoNot until server-side implementations exist. Depending on the physical location and amount of data being replicated, you'll need the flexibility to move master-game simulation logic from dedicated server to shared client. WebRTC works great if you're doing p2p among browsers, which severely limits the kinds of multiplayer experiences you can create. I love WebRTC and think it's great. I studied and read all related RFCs and tried implementing a stack in JavaScript for Node.js. Got stuck on DTLS, then switched jobs. I do think WebRTC is "the future," but we don't seem to be moving AT ALL towards that future. Having multiple implementations would move the needle. Otherwise, there was this big leap forward when it was developed and added to browsers, but not much since.
- hardwaresofton 10y agoNote that signaling for WebRTC is still recommended to be sent over HTTPS! Signaling (before the p2p connection is fully negotiated) can be eavesdropped if not done properly.
- SCdF 10y agoDeep down there is the conversation about using both TCP and UDP. This leads to a paper[1] presented in 1997. How much does this sort of thing (and the hardware / capability it's running on) change in 20 years? I wonder if it's worth revisiting. [1] https://www.isoc.org/INET97/proceedings/F3/F3_1.HTM https://www.isoc.org/INET97/proceedings/F3/F3_1.HTM
- banachtarski 10y agoThis paper always baffled me in terms of why it was significant. Basically, TCP is just nasty to ALL other transports passing through the same node/pipe (including other TCP). I don't know why, a) this is a surprise or b) only UDP is singled out as an affected transport in this scenario.
- fulafel 10y agoUsing unreliable or out-of-order data for game state sounds hard and difficult to test, no? Are there code level patterns that help reduce the complexity while keeping the possible performance benefits? If your entity state changes ("move player 1 to 3,4", "open door 3") are dropped/switch order, the logic no worker works. This way the unreliability seems to leak directly to game logic/scripting layer. On the face of it the complexity cost seems high for supporting bad network connections. A normal TCP connection rarely sees losses or reorderings. There are exceptions (twitch games) of course.
- zurn 10y agoSomehow networked shooters manage to leverage it. They probably only use unreliable messages for the twich mechanic hot-path which is heavily analyzed, iterated and tested anyway.
- bullen 10y agoI made this HTTP comet-stream solution for multiplayer games: http://fuse.rupy.se/fuse.html http://fuse.rupy.se/fuse.html
- ceejay 10y agoWebSockets are just too slow https://www.w3.org/TR/tcp-udp-sockets/ https://www.w3.org/TR/tcp-udp-sockets/ Not sure status of this standard, or plans for adoption. As long as proper steps are taken to allow for secure implementations I'm all for it.
- suhith 10y agoWebRTC Datachannels are awesome, I've always thought they could be leveraged for efficient peer to peer gaming but this is definitely interesting as well. Getting started with webrtc datachannels is easy and you can even have your server in Python Flask, but keep in mind you'll have to handle multiple concurrent connections. Here's a simple file sharing demo I made a while ago https://github.com/suhithr/CampFile https://github.com/suhithr/CampFile
- sherwinsim 10y agoThe data channel seems like one of the most under-utilized features for WebRTC. On our platform we've seen a handful of companies develop RT games and applications. Nice to see people developing applications other than AV applications. Going to also shamelessly promote our webrtc platform www.temasys.io It has very strong support for data channel, and socket messaging.