Network code

from Wikipedia, the free encyclopedia

The term network code comes from the network jargon (from the English "netcode", the abbreviation for "network code", in German for example: network program code ) and here usually refers to the part of a computer program that is responsible for communication in networks .

The term is often used in computer games in connection with lags or actual deficiencies in the multiplayer behavior of computer games.

purpose

The aim is to transfer the current status of one's own character to the central game server and at the same time to maintain the status of the other characters and the game world, which is as current as possible.

The current state can be determined by any type and number of attributes. The current state of health of characters, skills and objects worn by the characters, as well as the type, size, position and direction of movement of characters and objects in the game world are widespread.

The client software installed on the computers of the game participants can graphically display this status information in succession and allow the player to interact with the objects and characters described in the status information.

implementation

In order to reduce the amount of data to be transmitted , a coded, i.e. not directly human-readable, network protocol (binary protocol) is used. In the layer below, a stateless network protocol such as UDP is usually used. The advantage of stateless protocols is the lower overhead and latency . This means that at least soft real-time requirements can be better met.

To simplify game development, these network protocols are packaged in program libraries to enable status information to be transmitted to the server using just a few lines of program code and also to simplify the creation of a central remote station, a game server .

Netcode libraries are often linked to other program libraries that are relevant for game development. For example, 3D graphics output, sound output and control input can be coupled. For example, it would be possible to assign a movement of your own playing figure and a sound to a mouse click and then use the netcode to send this status information to the game server and thus to the other game participants.

In a further abstraction, netcode can also be contained in a game development toolkit or a game engine , which represent a complete package for the development of a specific game.

This complete package character makes it possible, for example, to tell the game engine to place a certain character in the game world and to equip it with various properties. As a result, it will also become visible to the other game participants without further action by the game developer, because the game engine automatically transfers the status information to and from the server.

It would also be possible, for example, to have a play figure perform a previously defined movement, for example to raise an arm and give an audible greeting. Instead of transmitting the information about the movement of each individual arm part and the command for sound output, these processes can be further summarized (abstracted) in order to reduce the amount of data to be transmitted. In this case, only the status information “Figure 1 greets” would be transmitted, which then also appears and sounds for the other game participants in their defined sequence.

Examples of netcode libraries are:

Web links

swell

  1. Valve Software: Half-Life Developer SDK ( Memento of the original from February 21, 2009 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. @1@ 2Template: Webachiv / IABot / www.vgpro.com
  2. a b Microsoft: DirectPlay 8 Protocol: Reliable
  3. generally derived from the properties of TCP vs UDP , but see also z. B. Number of games that have UDP ports versus the number of TCP ports. No multiplayer computer game uses TCP.
  4. ORGE Project: Common game networking libraries ( Memento from February 9, 2007 in the Internet Archive )
  5. SDL Introduction ( Memento of the original from March 8, 2009 in the Internet Archive ) Info: The archive link was inserted automatically and has not yet been checked. Please check the original and archive link according to the instructions and then remove this notice. , SDL_net Overview @1@ 2Template: Webachiv / IABot / www.libsdl.org
  6. see for example CryEngine , Quake-Engine or a general list of game engines .
  7. id Software: Quake 3 engine source code and enclosed developer manual ( Memento of July 8, 2009 in the Internet Archive )