![]() This elegantly solves the problem of websites that need to display dynamically changing content, because once a web socket connection is established, the server can push data to the browser without a corresponding request. ![]() WebSockets are an extension to the HTTP protocol which upgrade a HTTP connection so that data can be exchanged bidirectionally, rather than in the traditional request/response pattern. This is completely unnecessary and could be fixed overnight if web games had some way to send and receive UDP packets. Instead, web games send their game data over TCP, causing hitches and non-responsiveness due to head of line blocking. The main problem for web games today is that game developers have no way to follow this industry best practice in the browser. So, what does this have to do with web games? This ensures that time series data arrives as quickly as possible without waiting for dropped packets to be resent. How this works in practice is that each game develops their own custom protocol on top of UDP, implementing basic reliability as required, while sending the majority of data as unreliable-unordered. Therefore, the standard solution in the game industry for the past 20 years has been to send game data over UDP instead. All data must be received reliably and in order. Unfortunately, there is no way to fix this behavior under TCP. The most recent data they want is delayed while waiting for old data to be resent, but by the time the resent data arrives, it’s too old to be used. This is called head of line blocking and it creates a frustrating and almost comedically tragic problem for game developers. Otherwise, data would be delivered out of order. To deliver data reliably and in order under packet loss, it is necessary for TCP to hold more recent data in a queue while waiting for dropped packets to be resent. The web is built on top of TCP, which is a reliable-ordered protocol. This leads to frustration from game developers, who just want to be able to send and receive UDP packets in the browser. Unfortunately, this new set of standards for web development don’t provide what multiplayer games need, or, provide it in a form that is too complicated for game developers to use. Rising to this challenge are modern web protocols like WebSockets, WebRTC, HTTP 2.0 and QUIC, which hold the potential to greatly improve the interactivity of the web. This has worked well for many years, but recently websites have become more interactive and poorly suited to the HTTP request/response paradigm. HTTP is built on top of TCP, a low-level protocol which guarantees data sent over the internet arrives reliably, and in the same order it was sent. Web browsers are built on top of HTTP, which is a stateless request/response protocol initially designed for serving static web pages. ![]() If a UDP equivalent of WebSockets could be incorporated into browsers, it would greatly improve the networking of these games. In 2017 the most popular web games like agar.io are networked via WebSockets over TCP.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |