Product Overview

From PX Documentation

Jump to: navigation, search

The NetDog engine is a networking engine for multiplayer online games designed with huge numbers of concurrent players in mind. The NetDog library consists of a simple yet powerful API with which developers can create multiplayer games with ease. In addition, the NetDog SDK ships with sample code demonstrating various use scenarios, starting with the simplest possible "Hello World" application and progressively delving into more advanced features.

NetDog makes online game development incredibly easy. It automatically handles low-level network functionality, so creating and customizing network connections is simple. NetDog has supports both Object-Model and Event-Model data models, allowing users to choose which paradigm makes the most sense for their specific application. (In fact, both the Object- and Event-based systems can be used simultaneosly.)

Contents

Pro Version

NetDog (Pro version only) helps you create highly scalable servers with tools to manage zones, shards, and instances, as well as perform load balancing and support database connections.

NetDog's flexible zone transfer tools, managed by the master server (a.k.a. tracker), are used to customize server configurations to meet your game needs. For more on the tracker and zones see Multi-Server. For more advanced configurations see the QuickWorld tutorial in the SDK (Pro version only).

Event Model

Events are the underlying basis for all NetDog activities (Object-Model functions are implemented using Events as well)--they can be used for arbitrary transfer of information and consist of, for example, in-game movements, rotations, object data, voice interaction, collision data, attack actions, etc. Users can use the NDSendEvent() function to send events over the network. Behind the scenes, events are sent as time-stamped data packets which are then stored in an "Event Queue". To process events in the Queue, receive new inbound events, and send pending outbound events, users can call NDEventLoop().

Event Types

All events have an associated Event Type. In order to send and process events of a certain type, the event type must first be registered with NetDog (see NDInstallEventType()). When a user installs an event type, they also specify what function to call when processing an event of that type. Click here to find details about Events.

Object Manager

In addition, NetDog comes with an Object Manager that allows users to create, store, and update network objects which store all relevant data about in-game objects. Typically, each user of the network will maintain a local version of each network object. NetDog provides mechanisms for updating and synchronizing objects across all clients and servers.

Object Types

Like events, all objects have a corresponding type. Users of the network must install each object type and register each object member field which will be synchronized over the network. When installing and registering an object type, the user installs callback functions which are called when NetDog creates, updates, or deletes an object.

All created objects are stored in the Object Manager and are assigned a unique ID. The Object Manager can be thought of as a database, and the ID can be thought of as an index of the object in that database. The function NDOGetByID() can be used to retrieve the local versions of objects from the Object Manager based upon their ID.

To create, delete, and update objects over the network, users can call NDCreateObject(), NDDeleteObject(), and NDUpdateObjectField() respectively. Then, when other users of the network call NDEventLoop(), NetDog will automatically call the appropriate underlying object creation, deletion, or update functions. Click here to learn more about Objects

Used together, the Object- and Event-Models are powerful tools that can integrate NetDog into any game or virtual world architecture. These tutorials describe how to quickly integrate NetDog using the Event Model, and the Object Model.

Connections

Netdog manages low-level network functionality on its own, establishing all socket connections, routing, messaging, and encryption. To establish a network connection, the programmer simply needs to specify a local owner of the connection, a remote address, and a connection role (server or client), and NetDog will take care of the rest.

NetDog also allows users to easily configure connections. Connection flags can be used to set reliable UDP, and other connection-wide options. Click here to learn more about Connections.

All network activity occurs over channels. When users create a connection, they connect over a specific channel. When a user sends an event, they send it out over a specific channel. When an object is created, it is created on a specific channel.

Most applications will only need one channel, so their users do not need to worry about which channel they are connecting to or sending events over. However, NetDog provides a multichannel option as an advanced feature for managing game objects and events. A channel can be thought of as a separate instance of NetDog: each channel has its own connections, its own Event Queue, and its own Object Manager which are totally isolated from those of other channels. Click here to learn more about Channels.