Engine infrastructure

From HEWIKI
Jump to: navigation, search

Contents

He server.png Documentation on this page is intended for customers of HeroEngine managing their own server(s).


From a hardware standpoint, a game created with HeroEngine is broken down into structures called Universes, which can run in different physical locations around the world. This page attempts to give a basic overview of how a Universe's servers and processes are inter-related.

Each game is composed of various Areas, each of which usually runs on a dynamic process known as an Area Server process. For a large Area, it might be handled by multiple Area Server processes, which might be running on multiple hardware servers within a Server Group.

All of the hardware which runs the Area Servers for a particular instance of the game will be located in the same geographical location, which is known as a Universe. Each Universe is completely separate -- though it's possible for a player or developer to teleport from one Area to another within the same Universe, they cannot access an Area in a different Universe unless they disconnect from their current Universe, and then connect to a different one.

Universes

Each universe runs on several linked processes that can span multiple computers, which talk to each other via a communication layer known as FireStorm. A Universe is the conceptual idea behind a group of hardware servers in one physical location. The group of servers contains all of the worlds that can be run from that location.

For example, when a developer connects to the game, they are using a client called HeroBlade. That client connects to a World, initially connecting to a process called the Dude Server, before being passed to one of the other server processes. Most commonly, a player or GameMaster will eventually be connected via the World Server process to an Area Server process. During the player's game session, the most common method of communication will be from their computer (the Client) to the particular Area Server process that the client is connected to at that time. As a player moves through the game, from area to area, they will probably be passed between multiple Area Server processes, each controlling a different geographical section of the game. All of these Area Server processes will be part of a single World, and that World will be part of a Universe of hardware servers which are in a single location (such as the West Coast or East Coast of the U.S.)

For each Universe, there is one Master Control process. There is also a Master Control Console, which is a GUI window that can be used to view and modify information related to the servers and processes at that location. Please see the section on the Master Control for more information.

Process/Server/Daemon List

Though servers and processes are essential to the proper functioning of the engine, a detailed understanding of most of the servers is not necessary.

For a complete list of basic processes, see Processes.

Communication Pathways

Server Process Diagram

It is worth discussing how the different parts of the engine talk to each other.

Typically, a player logs into the game via their client. Some parts of HeroEngine have similar but separate counterparts on both the client and the various server processes. For example, the client has its own script engine on the user's computer, and there is a separate script engine on the server side.

The client talks to various server processes via communication channels. The Area Server can also send commands back to the Client via the same channel. Commands are handled by the $COMMANDHANDLER system node. For more information, please see the section below on Script Entry Points.

Another commonly-used communications pathway is between the Area Server processes and the World Server process. See below for more information.

Pre-Defined Scripts and Data

Though most elements of the DOM and scripting engine are to be created by GameMasters, in order to allow for smooth functioning of the engine, some elements needed to be pre-defined. For example, in order for the data structures of the DOM to work, there are some initial pieces of data that needed to be in place before other more elaborate structures could be defined (sort of a chicken and the egg problem). There are also certain scripts that are designated as entry points into the scripting engine, meaning that they're the scripts that first get passed the information from a particular server, so that that information can then be processed by the scripts.

For example, when a GameMaster types a command, that text is sent from the client to its current Area Server, where it is handed to a function in the CommandHandler script. The CommandHandler script on the Area Server will then examine what it has been passed and either:

Script Entry Points

See also: Category:Script entry points

The Area and World Servers make calls (known as callbacks) to well-known script functions in response to some events that need to be handled by script logic. The server expects these well-known functions to be defined in well-known scripts. If the script or function is missing, the servers will not run. If the arguments to the functions do not match what the server expects, an error will be generated when the script event is processed.

These events generally occur in response to incoming data from players, or are triggered by a timer. Timer callbacks are described separately.

To see the individual functions, check the appropriate Pre-Defined Scripts below.

Another class of entry point on the server side are calls to the function UpgradeClass.

Pre-Defined Scripts

The pre-defined scripts (of the clean HeroEngine) are the class method scripts of the System Nodes, such as $WORLD, $AREA, $ACCOUNT, $EDIT and $COMMANDHANDLER. Each system node is intended to be overridden and extended via the mechanism of "GLOMming" a class specific to your game onto the system node.

Additional information

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox