News Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute Logo

Changing the way games are made and played.

Torque Network Library Reference

Torque Network Library Reference


The Torque Network Library is a networking API designed to allow developers to easily add world-class multiuser simulation capabilities to their products. The TNL has proven successful in some of the most demanding multiplayer internet games and has gone through years of steady, evolutionary improvement.

Scope of This Documentation

Getting Started gives new users the information they need to download TNL source files, set up projects on supported compilers, and build and run the library and example programs.

History of the Torque Network Library gives a brief history of the Torque Network Library from its origins as the network technology behind Sierra/Dynamix's Starsiege: TRIBES to its current status as a standalone network programming solution.

Introduction to Network Programming Concepts introduces the developer to some of the basic concepts of network programming, including fundamental limitations of data networks, standard protocols, application network topologies, security and the hurdles the TNL will help them overcome in providing a consistent simulation on an unreliable communications medium.

Torque Network Library Design Fundamentals describes the general strategies used in the TNL to overcome the inherent limitations of today's networks.

Torque Network Library Architectural Overview gives an overview of the major classes in the TNL, from the basic Socket layer to the advanced state replication facilities provided by the GhostConnection and NetObject layer.

The TNL namespace contains all of the major classes and structures in the Torque Network Library.

Simple Torque Network Library Tutorial: Hello World walks the developer through the creation of a simple, networked "Hello World!" program.

TNLTest is a more complete TNL example program, utilizing the GhostConnection's object replication facilities.

The MasterServerInterface class describes the simple master matchmaking server that comes included with TNL, and the client connection API for communicating with it.

Finally, the ZAP project puts it all together in a 2D overhead team-based client/server space arcade action game, featuring a LAN/internet server browser, object interpolation and extrapolation, a client-side prediction model, and a more complete demonstration of the advanced features of the Torque Network Library.

We presume the reader is familiar with C++ programming and concepts.


John Quigley - For his incredible patience as the Linux build master.

Ben Garney - For his mad documentation skills and for usefully doing other projects that would have distracted Mark - and sound effects.

Tom St. Denis - For his excellent libtomcrypt cryptographic library that is included in the TNL.

The GLUT developers - For a cross-platform, easy-to-use OpenGL initialization, input and windowing API.

The OpenAL team - For a good, cross-platform audio API.

Ari Juels and John Brainard - For their work on Client Puzzles.

Tuomas Aura, Pekka Nikander, and Jussipekka Leiwo of the Helsinki University of Technology - For their work on DoS resistant Authentication with Client Puzzles.