The Seamless world 1.0 is a HeroEngine Version 1.22.0 feature which allows for characters to move "seamlessly" between area server processes.
Seamless World 2.0 is a HeroEngine Version 1.35.0 feature which provides a much simpler approach to linking areas. This is the approach you will most likely want to use, unless you need fine-grained control over area instancing.
Overview of Seamless World 1.0
The Seamless World 1.0 feature allows you to connect Areas Instances together such that, from the player's perspective, they appear as one contiguous terrain. This is all very flexible: The entire world may be constructed this way, or just parts of the world can be made up of a set of areas which are seamlessly connected. Further, all of this coexists with the normal area instancing so that you can have 'instanced dungeons' or even multiple instances of the same contiguous seamless world space. HeroEngine facilitates writing game logic to function transparently when interactions cross server boundaries.
The HeroEngine client will only display one area's assets at a time, so the transition from one Area to another is hidden from the player by use of carefully designed transition topology. Other areas may be preloaded in the background, so the currently displayed area can switch essentially instantaneously. Therefore, in order to maintain the illusion of a continuous world, the switch needs to happen in a place where everything seen is the same. Typically this is done with a portion of the each connecting areas having the same geometry, with a space which has no visibility to the rest of the area. For example: a building hallway, a cave passage, a forest clearing or path, etc.
Characters in one area can "see" characters in a different area, via replication. Characters are replicated to clients other than clients in the area (see Player Reference Tokens below). This is how characters near the seamless boundary show up on the client. On the server side, client presence is shared between connected areas so that appropriate characters are replicated.
The final key piece to all of this is frame of reference adjustment. Each area has its own coordinate system origin, so positions from other servers must be adjusted to match the current area. Replication can be setup to do this automatically. Also, at the instant that the client switches areas, all of the characters' positions must be adjusted.
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:
- Launch the destination area instance if one is not already available
- Preload the destination area's geometry, assets, textures and other resources
- Proxying players and/or creatures that get close to a seamless boundary
- Transfer the player's node hierarchy from the source area to the destination area
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. Seamless links created using the default spec have the following behaviors:
- Launches a destination area instance if one is not already connected. If the source area is a Play Instance a play instance of the destination area will be spun up. If the source area is the Edit Instance the edit instance of the destination will be spun up.
- Players will be proxied across the seamless boundary.
- The link uses awareness ranges that generally make sense, however a variety of factors may necessitate different ranges (see Seamless area link for additional information)
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
The construction of Seamless Area Links is a complicated process that generally occurs in conjunction with the introduction of one or more area assets via the Asset Library. Due to the complexity, the MMO Foundation Framework includes a Spec Oracle whose specifications act as instructions to the engine for the construction of a seamless area link. Since it is improbable we have accounted for everything a game might want a seamless area link to do, the implementation is sufficiently generic and extensible that any game-specific behavior is possible through the extension of the Seamless Link Spec Oracle with new base or decorator classes.
Included in the Seamless Area Link Spec Oracle is a default specification called the
Standard S-Curve Asset which is capable of handling the general case for a seamless area link whereby a special asset (Transition Topology) is placed in both source and destination areas and treated as being coincident in space.
For seamless operation, certain nodes need to have proxy representations in adjacent area servers. This is done using Replication. For instance, the _playerAccount node is replicated and entered into Spatial Awareness so that nearby characters become replicated to the player's client. These proxied nodes have a subset of the data on the original node and have special handling for method calls.
To support seamless operation across server boundaries, methods called on proxy nodes must indicate where (in which area server's GOM) the call should be handled. The choices are:
- Executing like a normal method call on the proxy node (proxyLocal), or
- Becoming a message to the server holding the original node (proxyForward).
ProxyForward methods are perfect for operations that change the data on the node. For example, a character being damaged by an attack. If the character node is a proxy, the method call is sent off like a remote call and executes on the original node. If the character node happens to be in the same area, the method call just happens immediately as usual.
In HeroEngine, every area operates in its own unique frame of reference and typically area geometry is positioned "near" the origin for the area's frame of reference. Because each area is its own unique frame of reference, this eliminates the problems large-scale MMOs encounter with the size of their game world. Without a reference frame adjustment, floating point inaccuracies as players move farther from the origin (0,0,0) creep in leading to endless problems with positional accuracy, animations and so forth. With HeroEngine, using the Seamless World technology, there is effectively no limit to the size of the game world.
When users are proxied across area bounds, something must occur so that the character's position appears to be coincident in the linked areas in spite of the different frames of reference. Positions from other servers are be adjusted to be in the current area's frame of reference and at the instant that the client switches areas any locally cached positions must be "rehomed".
- See also: Reference Frame Adjustment
Client Able to Load Multiple Areas Simultaneously
Supporting Seamless World, the Player Client and HeroBlade have been modified to support the ability to load multiple areas simultaneously in the background as the player interacts in the currently "active" area.