Client-side prediction

Last updated

Client-side prediction is a network programming technique used in video games intended to conceal negative effects of high latency connections. The technique attempts to make the player's input feel more instantaneous while governing the player's actions on a remote server.

The process of client-side prediction refers to having the client locally react to user input before the server has acknowledged the input and updated the game state. [1] So, instead of the client only sending control input to the server and waiting for an updated game state in return, the client also, in parallel with this, predicts the game state locally, and gives the user feedback without awaiting an updated game state from the server.

Client-side prediction reduces latency problems, since there no longer will be a delay between input and client-side visual feedback due to network ping times. However, it also introduces a desynchronization of the client and server game states, which needs to be handled to keep the game playable. [1] Usually, the desync is corrected when the client receives the updated game state, but as instantaneous correction would lead to "snapping", there are usually some "smoothing" algorithms involved. For example, one common smoothing algorithm would be to check each visible object's client-side location to see if it is within some error epsilon of its server-side location. If not, the client-side's information is updated to the server-side directly (snapped because of too much desynchronization). However, if the client-side location is not too far, a new position between the client-side and server-side is interpolated; this position is set to be within some small step delta from the client-side location, which is generally judged to be "small enough" to be unintrusive to the user.

Another solution to the desynchronization issue, commonly used in conjunction with client-side prediction, is called server reconciliation. [2] The client includes a sequence number in every input sent to the server, and keeps a local copy. When the server sends an authoritative update to a client, it includes the sequence number of the last processed input for that client. The client accepts the new state, and reapplies the inputs not yet processed by the server, completely eliminating visible desynchronization issues in most cases.

The earliest known first-person shooter to use client-side prediction is Duke Nukem 3D, which had it built-in since the January 29, 1996 shareware release. [3] [4] The technique was also a prominent feature of QuakeWorld , the popular add-on to Quake . While network play was included in the original Quake game, it was optimized mainly for LAN play. Having had high-speed home connections (a rarity at the time), Quake's designers overlooked their assumptions of high bandwidth and low ping times that made playing online frustrating for dial-up users. [5] After a series of experiments in a long private beta, id Software released QuakeWorld with a new predictive model that proved popular with both high and low latency players.

See also

Related Research Articles

Cache (computing) Data storage that enables faster access

In computing, a cache is a hardware or software component that stores data so that future requests for that data can be served faster; the data stored in a cache might be the result of an earlier computation or a copy of data stored elsewhere. A cache hit occurs when the requested data can be found in a cache, while a cache miss occurs when it cannot. Cache hits are served by reading data from the cache, which is faster than recomputing a result or reading from a slower data store; thus, the more requests that can be served from the cache, the faster the system performs.

Thin client Non-powerful computer optimized for remote server access

In computer networking, a thin client is a simple (low-performance) computer that has been optimized for establishing a remote connection with a server-based computing environment. The server does most of the work, which can include launching software programs, performing calculations, and storing data. This contrasts with a fat client or a conventional personal computer; the former is also intended for working in a client–server model but has significant local processing power, while the latter aims to perform its function mostly locally.

Load balancing (computing) Set of techniques to improve the distribution of workloads across multiple computing resources

In computing, load balancing refers to the process of distributing a set of tasks over a set of resources, with the aim of making their overall processing more efficient. Load balancing can optimize the response time and avoid unevenly overloading some compute nodes while other compute nodes are left idle.

In computer science, algorithmic efficiency is a property of an algorithm which relates to the amount of computational resources used by the algorithm. An algorithm must be analyzed to determine its resource usage, and the efficiency of an algorithm can be measured based on the usage of different resources. Algorithmic efficiency can be thought of as analogous to engineering productivity for a repeating or continuous process.

QuakeWorld is an update to id Software's seminal multiplayer deathmatch game, Quake, that enhances the game's multiplayer features to allow people with dial-up modems to achieve greatly improved responsiveness when playing on Internet game servers. Modern broadband connections such as cable and DSL can use the QW network handling and game physics as well. Official id Software development stopped with the test release of QuakeWorld 2.33 on December 21, 1998. The last official stable release was 2.30. QuakeWorld has been described by IGN as the first popular online first-person shooter.

Unsupervised learning Machine learning technique

Unsupervised learning is a type of machine learning in which the algorithm is not provided with any pre-assigned labels or scores for the training data. As a result, unsupervised learning algorithms must first self-discover any naturally occurring patterns in that training data set. Common examples include clustering, where the algorithm automatically groups its training examples into categories with similar features, and principal component analysis, where the algorithm finds ways to compress the training data set by identifying which features are most useful for discriminating between different training examples, and discarding the rest. This contrasts with supervised learning in which the training data include pre-assigned category labels. Other intermediate levels in the supervision spectrum include reinforcement learning, where only numerical scores are available for each training example instead of detailed tags, and semi-supervised learning where only a portion of the training data have been tagged.

Game client

A game client is a network client that connects an individual user to the main game server, used mainly in multiplayer video games. It collects data such as score, player status, position and movement from a single player and send it to the game server, which allows the server to collect each individual's data and show every player in game, whether it is an arena game on a smaller scale or a massive game with thousands of players on the same map. Even though the game server displays each player's information for every player in a game, players still have their own unique perspective from the information collected by the game client, so that every player's perspective of the game is different, even though the world for every player is the same. The game client also allows the information sharing among users. An example would be item exchange in many MMORPG games where a player exchange an item he/she doesn't want for an item he/she wants, the game clients interconnect with each other and allows the sharing of information, in this exchanging items. Since many games requires a centralized space for players to gather and a way for users to exchange their information, many game clients are a hybrid of client-server and peer-to-peer application structures.

A web accelerator is a proxy server that reduces website access time. They can be a self-contained hardware appliance or installable software.

A collaborative real-time editor is a type of collaborative software or web application which enables real-time collaborative editing, simultaneous editing, or live editing of the same digital document, computer file or cloud-stored data – such as an online spreadsheet, word processing document, database or presentation – at the same time by different users on different computers or mobile devices, with automatic and nearly instantaneous merging of their edits.

In online transaction processing (OLTP), information systems typically facilitate and manage transaction-oriented applications.

A game server is a server which is the authoritative source of events in a multiplayer video game. The server transmits enough data about its internal state to allow its connected clients to maintain their own accurate version of the game world for display to players. They also receive and process each player's input.

A lagometer is a display of network latency on an Internet connection and of rendering by the client. Lagometers are commonly found in computer games or IRC where timing plays a large role. Quake and derived games commonly have them.

Real-time business intelligence (RTBI) is a concept describing the process of delivering business intelligence (BI) or information about business operations as they occur. Real time means near to zero latency and access to information whenever it is required.

In online gaming, lag is a noticeable delay (latency) between the action of players (input) and the reaction of the server supporting the game, which has to be sent back to the client.

Display lag is a phenomenon associated with some types of liquid crystal displays (LCDs) like smartphones and computers, and nearly all types of high-definition televisions (HDTVs). It refers to latency, or lag measured by the difference between the time there is a signal input, and the time it takes the input to display on the screen. This lag time has been measured as high as 68 ms, or the equivalent of 3-4 frames on a 60 Hz display. Display lag is not to be confused with pixel response time. Currently the majority of manufacturers do not include any specification or information about display latency on the screens they produce.

Strafing is the act of moving sideways in a video game relative to the player's forward direction. Strafing allows a player to keep the camera focused on a target such as an enemy, while moving in a different direction.

Cloud gaming, sometimes called gaming on demand or gaming-as-a-service, is a type of online gaming that runs video games on remote servers and streams them directly to a user's device, or more colloquially, playing a game remotely from a cloud. It contrasts with traditional means of gaming, wherein a game runs locally on a user's video game console, personal computer, or mobile device.

Web performance refers to the speed in which web pages are downloaded and displayed on the user's web browser. Web performance optimization (WPO), or website optimization is the field of knowledge about increasing web performance.

Netcode is a blanket term most commonly used by gamers relating to networking in online games, often referring to synchronization issues between clients and servers. Players often infer "bad netcodes" when they encounter connection problems in a game. Some common causes: high latency between server and client, packet loss, network congestion, etc.. Unrelated external factors independent to network quality such as frame rendering time or inconsistent frame rates.

Visual Cloud is the implementation of visual computing applications that rely on cloud computing architectures, cloud scale processing and storage, and ubiquitous broadband connectivity between connected devices, network edge devices and cloud data centers. It is a model for providing visual computing services to consumers and business users, while allowing service providers to realize the general benefits of cloud computing, such as low cost, elastic scalability, and high availability while providing optimized infrastructure for visual computing application requirements.

References

  1. 1 2 Bernier, Yahn W. (2001). "Latency Compensating Methods in Client/Server In-game Protocol Design and Optimization" (PDF). Retrieved 2008-12-19.
  2. Gabriel Gambetta, Client-Side Prediction and Server Reconciliation
  3. Dransfield, Ian (2018-07-14). "The Engine Room: Build". Retro Gamer . United Kingdom: Future plc (182): 62–67. ISSN   1742-3155 . Retrieved 2018-11-24.
  4. Duke Nukem 3D (v1.5 CD Version) Source Code Release - April 1, 2003, See domovethings(), fakedomovethings(), and fakedomovethingscorrect(), Video Game Preservation, 2019-05-15, retrieved 2019-05-15CS1 maint: others (link)
  5. John Carmack, QuakeWorld .plan