ITrainz

From TrainzOnline
Revision as of 16:20, 26 July 2008 by Windwalkr (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

The iTrainz technology provides a mechanisms for scripts to communicate between computers in an internetworked environment. Trainz users are uniquely identified via their Planet Auran username.


Contents

Network Interface Library

An iTrainz interface is implemented via a script library. The library is responsible for performing the actual network communication and maintaining any local state. An example of this technique is the built-in "OAChat.gs" script library. The library should isolate the "front-end" script code (such as a rule or scripted map object) from the details of network communication, and instead provide a specific feature set.

Internally, the script library makes use of the "OnlineAccess.gs" script class to perform network operations. Where communication is shared between multiple users, the "OnlineGroup.gs" script class may be useful.


iTrainz Capabilities

The iTrainz API presents the following capabilities to a script programmer:

  • Connection management functions - connect, disconnect, and status queries.
  • Determine the Planet Auran username for the local user.
  • Store custom data on the local user's profile.
  • Send messages to script instances running on another user's machine, including a 'mailbox' mechanism if the user is offline.
  • Receive alerts on incoming data.
  • Create and manage transient groups of users.
  • Create persistent server applications via iTrainz Servlets.


iTrainz Chat

Auran includes the iTrainz Chat interface as an example of iTrainz functionality. This script allows communication between users whenever they are in-game, enabling community chat channels and private messaging.


iTrainz Native API

Auran intends to release native (C++) API support to allow third-party developers to work with the iTrainz network. There are two main features which this will enable at the current time:

  • A third-party client executable that allows participation in iTrainz Chat and similar while outside the Trainz environment.
  • A third-party server executable that performs custom processing for script clients with requests and responses sent over the iTrainz network.

A native iTrainz session is tied to a Planet Auran account in the same way as a script session. Typically, the native API has the same limitations (including bandwidth limitations) as the script API, however Auran may choose to provide 'server' accounts with some limitations lifted for specific applications that Auran believes are beneficial.


iTrainz Usage Policy

Auran reserves the right to ban accounts or specific KUIDs from the iTrainz network if they are found to be abusing the network, for example by spamming, by attempting to work around documented restrictions, or by attempting to capture information from client machines without permission. If there's something that you'd like to implement but you have doubts regarding its legitimacy, don't hesitate to contact Auran for clarification.

Personal tools