DirectPlay
Encyclopedia
DirectPlay is part of Microsoft
Microsoft
Microsoft Corporation is an American public multinational corporation headquartered in Redmond, Washington, USA that develops, manufactures, licenses, and supports a wide range of products and services predominantly related to computing through its various product divisions...

's DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

 API. DirectPlay is a network communication library intended for computer game development, although its general nature certainly allows it to be used for other purposes.

DirectPlay is a high-level software interface between applications and communication services that makes it easy to connect games over the Internet
Internet
The Internet is a global system of interconnected computer networks that use the standard Internet protocol suite to serve billions of users worldwide...

, a modem
Modem
A modem is a device that modulates an analog carrier signal to encode digital information, and also demodulates such a carrier signal to decode the transmitted information. The goal is to produce a signal that can be transmitted easily and decoded to reproduce the original digital data...

 link, or a network
Computer network
A computer network, often simply referred to as a network, is a collection of hardware components and computers interconnected by communication channels that allow sharing of resources and information....

. DirectPlay features a set of tools that allow players to find game sessions and sites to manage the flow of information between hosts and players. It provides a way for applications to communicate with each other, regardless of the underlying online service or protocol. DirectPlay also resolves many connectivity issues, such as NAT
Network address translation
In computer networking, network address translation is the process of modifying IP address information in IP packet headers while in transit across a traffic routing device....

.

DirectPlay, as the rest of DirectX, runs in COM and it is accessed through COM
Component Object Model
Component Object Model is a binary-interface standard for software componentry introduced by Microsoft in 1993. It is used to enable interprocess communication and dynamic object creation in a large range of programming languages...

 (Component Object Model) interfaces
Interface (computer science)
In the field of computer science, an interface is a tool and concept that refers to a point of interaction between components, and is applicable at the level of both hardware and software...

. By default, DirectPlay uses multi-threaded
Thread (computer science)
In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...

 programming techniques and requires careful thought to avoid the usual threading issues. Since DirectX version 9, this issue can be alleviated at the expense of efficiency.

Networking model

Under the hood, DirectPlay is built on the User Datagram Protocol
User Datagram Protocol
The User Datagram Protocol is one of the core members of the Internet Protocol Suite, the set of network protocols used for the Internet. With UDP, computer applications can send messages, in this case referred to as datagrams, to other hosts on an Internet Protocol network without requiring...

 (UDP) to allow it speedy communication with other DirectPlay applications.

DirectPlay sits on layer 4 and 5 of the OSI model
OSI model
The Open Systems Interconnection model is a product of the Open Systems Interconnection effort at the International Organization for Standardization. It is a prescription of characterizing and standardizing the functions of a communications system in terms of abstraction layers. Similar...

.
  • On layer 4, DirectPlay can handle the following tasks if requested by the application:
    • Message ordering, which ensures that data arrives in the same order it was sent.
    • Message reliability
      Reliability (computer networking)
      In computer networking, a reliable protocol is one that provides reliability properties with respect to the delivery of data to the intended recipient, as opposed to an unreliable protocol, which does not provide notifications to the sender as to the delivery of transmitted data.A reliable...

      , which ensures that data is guaranteed to arrive.
    • Message flow control
      Flow control
      In data communications, flow control is the process of managing the pacing of data transmission between two nodes to prevent a fast sender from outrunning a slow receiver. It provides a mechanism for the receiver to control the transmission speed, so that the receiving node is not overwhelmed with...

      , which ensures that data is only sent at the rate the receiver can receive it.
  • On layer 5, DirectPlay always handles the following tasks:
    • Connection initiation and termination.

Interfaces

  • The primary interfaces (methods of access) for DirectPlay are:
    • IDirectPlay8Server, which allows access to server
      Server (computing)
      In the context of client-server architecture, a server is a computer program running to serve the requests of other programs, the "clients". Thus, the "server" performs some computational task on behalf of "clients"...

       functionality
    • IDirectPlay8Client, which allows access to client
      Client (computing)
      A client is an application or system that accesses a service made available by a server. The server is often on another computer system, in which case the client accesses the service by way of a network....

       functionality
    • IDirectPlay8Peer, which allows access to peer-to-peer
      Peer-to-peer
      Peer-to-peer computing or networking is a distributed application architecture that partitions tasks or workloads among peers. Peers are equally privileged, equipotent participants in the application...

       functionality
  • Secondary interfaces are:
    • Various lobby interfaces that allows players to find and prepare a game before it actually commences.
    • Thread management interfaces that allows the programmer to fine-tune resource usage. This also allows for a general disabling of worker threads so that tricky multi-threaded
      Thread (computer science)
      In computer science, a thread of execution is the smallest unit of processing that can be scheduled by an operating system. The implementation of threads and processes differs from one operating system to another, but in most cases, a thread is contained inside a process...

       issues are avoided at the cost of decreased responsiveness.
    • Various network address translation
      Network address translation
      In computer networking, network address translation is the process of modifying IP address information in IP packet headers while in transit across a traffic routing device....

       (NAT) interfaces that make it easier for players behind routers to host games. Most players on broadband
      Broadband
      The term broadband refers to a telecommunications signal or device of greater bandwidth, in some sense, than another standard or usual signal or device . Different criteria for "broad" have been applied in different contexts and at different times...

       internet connections face this problem.
    • Various voice communication interfaces known as DirectPlay Voice that make it easier to support audio communication and voice input in games.
    • Various queue monitoring interfaces that allow the application to get feedback on how much data has been sent and received as requested. This allows an application to decrease/increase the amount of data sent in accordance with the capabilities of the receiver.

DirectPlay Voice

DirectPlay Voice was introduced in Windows Me
Windows Me
Windows Millennium Edition, or Windows Me , is a graphical operating system released on September 14, 2000 by Microsoft, and was the last operating system released in the Windows 9x series. Support for Windows Me ended on July 11, 2006....

 as part of DirectX 7.1 for multiplayer games. It is a voice communications, recording and playback API that allows gamers to use voice chat
Voice chat
Voice chat is a modern form of communication used on the Internet. The means of communicating with voice chat is through any of the messengers, mainly Skype, Yahoo! Messenger, AOL Instant Messenger, inSpeak Communicator or Windows Live Messenger...

 in games written to take advantage of the API, through a DirectPlay network transport session itself.

Current status

DirectPlay was traditionally one of the components of DirectX that received less attention, but for DirectX version 8 it received a major overhaul and became a relatively lightweight networking library. However, as part of Microsoft's unveiling of XNA in 2004, Microsoft revealed that DirectPlay would be deprecated in favor of Games for Windows - Live technology already available on Xbox
Xbox
The Xbox is a sixth-generation video game console manufactured by Microsoft. It was released on November 15, 2001 in North America, February 22, 2002 in Japan, and March 14, 2002 in Australia and Europe and is the predecessor to the Xbox 360. It was Microsoft's first foray into the gaming console...

 and being ported for use on Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

 PCs
Personal computer
A personal computer is any general-purpose computer whose size, capabilities, and original sales price make it useful for individuals, and which is intended to be operated directly by an end-user with no intervening computer operator...

. DirectPlay will be supported in DirectX DLLs for the lifetime of Microsoft Windows XP, but from the autumn of 2007 the headers and libraries — vital components if developers wanted to develop new programs that utilize the technology — were absent from DirectX SDK.

In Windows Vista
Windows Vista
Windows Vista is an operating system released in several variations developed by Microsoft for use on personal computers, including home and business desktops, laptops, tablet PCs, and media center PCs...

, DirectPlay has been deprecated and DirectPlay Voice and DirectPlay's NAT
Network address translation
In computer networking, network address translation is the process of modifying IP address information in IP packet headers while in transit across a traffic routing device....

Helper have been removed.

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK