Seamless area link

From HEWIKI
Jump to: navigation, search


Seamless area links serve as the "glue" between two area instances permitting a player to walk from one area to the next without experiencing a loading screen. They are a part of the Seamless World 1.0 system. Seamless links in the Seamless World 2.0 system are inherent properties of areas, and are edited on the Area panel.

Contents

Overview

Transition Pieces

A seamless area link is a construct comprised of GOM objects, HSL behaviors and (optionally) area assets that serves to initiate preload, proxying, transfer of the player from one area's GOM to the destination area's GOM and mask the activation/deactivation of the areas.

Seamless Area Links generally include functionality to:

The MMO Foundation Framework supports the creation of seamless links through the library using the Seamless Link Spec Oracle to factory the necessary GOM nodes to create a functional link. The default spec creates a seamless area link that handles all four of the functions described above using a Transition Piece and a trigger.

Transitional Asset

A typical seamless area link will include a specially constructed Transition Topology that serves to mask the deactivation of the source area and activation of the destination area. The initial release of Seamless world uses a "transition piece", which is typically constructed in the classic S-curve commonly used in games to limit sightlines. The transition piece is placed in both source and destination areas and is treated as if it is coincident by virtue of reference frame adjustment. When a user transitions from the source area to the destination area, they are placed in an adjusted position such that they arrive (from the perspective of the user) in exactly the same spot in the transition piece.

Transition pieces can be made from assets or heightmaps and come in a variety of forms such as caves, winding hallways, narrow canyons, passes between mountains or any other topology that will serve to mask the swap between active areas.

See also: Area Architecture

Concepts


Standard S-Curve Seamless Area Link

SeamlessAreaLinkSpecOne.gif
SeamlessAreaLinkTriggerPlacement.gif
The standard seamless area link is instantiated from Spec number One of the Seamless Link Spec Oracle which is included in the MMO Foundation Framework.

This link is constructed from a Transition Asset in the basic S-Curve pattern common to games to limit sightlines, three spatial awareness entities and a trigger. The Spatial Awareness Entities represent different ranges at which the link performs one or more actions including; Launching a connection destination area instance if one is not already connected, initiating preload of the destination area instances Geometry and Proxying a subset of the account hierarchy to the destination area. Additionally, a trigger is included in the Library Asset and is used to initiate the actual handoff of the account hierarchy between source and destination areas.

It is important in this type of Seamless Area Link that the triggers be placed so they are not coincident or an infinite loop of handing off the player between source and destination occurs. As illustrated (right), the trigger should be placed such that it is closer to the exit side of the Transition Topology so that a player arriving from the connecting area is already past (i.e. the trigger in the new area is behind them as they continue to seamlessly move forward).

Remember, the two S-curves are effectively coincident in space due to Reference Frame Adjustment.


Entity Awareness Ranges

A variety of factors play into the consideration as to what ranges should be used for launching, preloading and proxying by a seamless area link. Ultimately, there is no "right" answer for any of these rather the values should be chosen to provide the right behavior for your game design and technical requirements. We can however suggest some factors to take into account when choosing awareness ranges.

Usage

SeamlessAreaLinkSelector.gif
Invoke the Seamless Area Link List View

Adding a Seamless Link To the Asset Library

See also: Seamless Area Link Tutorial

List Seamless Area Links in Current Area

Using the Utilities Interface, navigate to the Tools panel and select the Seamless Area Links link. This will invoke the Seamless Area Link List View.

In HSL/GOM, a seamless area link is associated to the _seamlessAreaLinkRoot via the _seamlessAreaLink soft association and may be gathered using a method exposed by the $AREA system node.

// List Seamless Area Links
var links = $AREA._GetSeamlessAreaLinks()


Edit a Seamless Area Link

SeamlessAreaLinkEditor.gif

Using the Utilities Interface, navigate to the Tools panel and select the Seamless Area Links link. This will invoke the Seamless Area Link List View. Select the link you wish to edit, and either double-click it or click the Edit button. This will invoke the Seamless Area Link Editor, which will display a properties grid whose contents are based on the classes the Seamless Link Spec has GLOMmed onto the link when it is factoried.

Please note, the illustration (right) displays the properties associated with the Standard S-Curve Seamless Area Link created using Seamless Link Spec One.

// Request the server create a copy of the seamless area link on the client for editing
// This uses the standard obsSubject/obsListener implementation of the observer pattern
var editListener = CreateNodeFromClass( "myListenerClass" )    
$TRAVEL._requestEditSeamlessAreaLink( linkID, listener )
See also: Observer pattern


Connecting a Seamless Area Link to a Destination Link

BrowseExistingSeamlessAreaLinks.png
SelectExistingSeamlessAreaLink.gif

Using the MMO Foundation Framework implementation for seamless area links, connecting a new seamless area link to an existing one is a simple process whereby you locate the property "Destination Seamless Link" and hit the elipsis button (...) to invoke the seamless area link selector. The seamless area link selector that is invoked will display a list of all seamless area links with the area name and the link name displayed.


Proxying Nodes Across a Seamless Boundary

SeamlessAreaLinkProxyPlayerAndNPCProperties.gif

Depending on your game design, it may be possible for players and nonplayer characters to interact across the seamless boundary through proxies. It is important to note that this type of interaction requires you architect your game systems in a particular way so they can function through the ProxyForward and ProxyLocal interfaces. By default, the MMO Foundation Framework Seamless Area Links proxy the primary nodes of the player's node hierarchy including their _playerAccount, _playerCharacter, _characterAppearance and the _ACCController nodes. The behavior of whether or not nodes are proxied is controlled by fields on the seamless area link.

Using a similar mechanic, it is possible to proxy any type of game object across seamless boundaries should the game design require the ability to interact with or view that type of object across boundaries.

See also: Proxied node

Reference

Script API

Linking Area Instances

To begin, the area instances need to know which other area instances are connected. A HeroScript system that persists the information will use these on the server side. The offset parameter is used for frame of reference adjustment (see below). The result of these calls is asynchronous.

external function EstablishSeamlessLink(areaID as ID, instanceID as ID, offset as Vector3)
external function RemoveSeamlessLink(areaID as ID, instanceID as ID)

And callbacks are made to the $AREA system node:

unique method _SeamlessLinkEstablished(area as ID, instance as ID)
unique method _SeamlessLinkRemoved(area as ID, instance as ID)

Preloading

Server side external functions control when a client starts background loading a area. A HeroScript system calls these based on Spatial Awareness System.

// The area and instance must have an established seamless link.
external function StartAreaPreload(player as ID, areaID as ID, instanceID as ID)
external function StopAreaPreload(player as ID, areaID as ID, instanceID as ID)

Handoff

When a player reaches the appropriate transition point (typically a trigger), the MovePlayerSeamlessly function is called. It initiates a process that packages up the character's node hierarchy and delivers it to the new area. Any server to server replications in this node hierarchy are modified to include the area being left and proxy nodes are left behind. Replication traffic is carefully queued and redirected so that operation continues as expected.

Instead of using the external function directly, we recommend you use the wrapper method implemented on the $TRAVEL system node.

$TRAVEL._MovePlayerSeamlessly( player, destinationArea, destinationInstance)

// The area and instance must have an established seamless link and preloading should have been started.
external function MovePlayerSeamlessly(player as ID, destinationArea as ID, destinationInstance as ID) as Boolean

These callbacks happen on the $ACCOUNT system node:

unique method _EnteredAreaSeamlessly( theAccount as NodeRef )
unique method _ExitingAreaSeamlessly( theAccount as NodeRef )

See Also

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox