Seamless World 2.0
All that follows on this page is an in-depth explanation about Seamless 2.0 Links. This matters for World Builders and Engineers, but for the beginner, or for someone that just wants to get areas linked up quick and easy you can follow these simple steps:
1. Create Area1
2. Create Area2
3. Edit Area1
4. Open Editors > Area
5. Click Add
6. Select Area2 from the list
7. Click Edit Offset
8. Use the Move Tool to select Area2 and move it next to Area1
9. Click Edit Offset again to save the position
Seamless World 2.0 is a feature which allows world builders to link adjacent areas together and adjust their relative offsets.
- NOTE: Please make sure you understand the difference between a room and an area.
- NOTE: Transitioning from one seamless area to another in the HeroBlade will cause the blade to stutter as it updates all of the editor level panels for the new area. This can be greatly minimized by closing all open panels if you are concerned. And the stutter will not occur in the player's client.
In Seamless 2.0, the client renders linked areas simultaneously with the current active area. Seamless links are an inherent property of areas, and are edited via the Seamless Links pane of the Area panel. Movement between areas is determined automatically by the client, according to the position of the controlled character. Whereas in Seamless 1.0, characters rely on Proxied node.
Each area in the HeroEngine is a discrete unit of server simulation. Therefore, we do not recommend making a simple grid of areas larger than 256 by 256 meters if you plan to use Seamless 2.0 Links, unless you are confident in your team's ability to to predict the client to server communication and simulation you plan to do in a given area. A common mistake is also to simply layout a grid of areas and think about the world building later. If we expected you to that, then we'd just provide you with a huge grid of seamless areas in your default world. You should link areas together based on how your players are going to play your game, where they will travel, and where areas of heavy load and light load will be. You can use any shapes and sizes of areas, irregular connections, two areas seamless connected to the border of one area, etc. The last thing you want is to create a situation where you have 4 area corners right where a high amount of traffic will be. So think about your world first, seamless build it later.
You can also build larger areas first, and then cut them up and use the "Bring Instance Here" button to move sections of the large area into subdivided seamlessly linked areas at a later date.
Rendering of Linked Areas
By default, unless you are using specific room layouts, the client will render the entire linked area. This is because any room in a linked area with the same name as the currently active area will be rendered. But since all areas have an "Everywhere" room, there is no need to specifically setup additional rooms for Seamless 2.0 links.
Note that the "Show All" option in the Room Panel will render all rooms in the active area, but does not apply to linked areas.
Creating a Seamless Link Between Existing Areas
- Select the "Move" tool.
- Open the Seamless Links tab of the Area panel, and click "Add." This will pop up a filterable list of all areas known by the Organizer.
- After selecting the Area your camera will rotate to face the center of the newly imported area.
- The Selected Area is now linked to the current area, but you'll notice it is just arbitrarily placed in space.
- Click "Edit Offset". A blue bar will appear at the top of the view window denoting that you are now in "Edit Offset" mode.
- Select anything in the newly imported area. The easiest is to select the heightmap with the edge you wish to align to the current area.
- Click the Dim Other Checkbox in the Room Visibility Tab. (This will turn all linked areas blue and make them more easily distinguishable from the current area).
- Maneuver the newly linked area, using the move tool, to line up roughly with where you want it.
- If areas already have seamless links, then moving one will move all areas it's linked to. To disable this automatic movement, hold SHIFT while moving.
- Click "Edit Offset" again to finish placing the area. It's important to understand, that if you attempted to move anything in the newly imported area while NOT in edit offset mode, then you were actually editing the other area, not editing the "Offset" of that area to the current area.
- If there are gaps you can use the Stitch tool to stitch the two areas' heightmaps together.
- Now you're done. The link is now a bi-directional connection between the current area and the new area, and removing the link in either area will remove it from both.
Seamless links do not have to be geometrically correct. The HeroEngine supports non-euclidean geometric relationships. This also means you can make an infinite loop of areas: the only rule is that you'll need more than 1 area before you can loop back to the start. So A > B > C > A works, while A > B > A does not, for obvious reasons of time imploding on itself...
Seamless cross-area editing
After returning to normal editing mode, node selection and all the usual node and terrain editing tools work seamlessly across areas.
Note there is always a single active area at any given time, displayed in the lower right context bar in HeroBlade and the second pane of the Area panel. Area-centric properties, such as environment schemes, path waypoints, terrain textures, and terrain dynamic details apply to the currently active area.
Any nodes you create belong to the active room in the active area.
Bring Instance Here
This button has nothing to do with moving areas, it's for bringing an object, or anything else, from one area, into the area you are currently editing. So if you are standing in area A, you can select a tree in area B, and click the "Bring Instance Here" button to reassign the tree to Area A. Instances are deleted from their original areas and recreated in the active area with the same ID number.
Seamless travel is automatically determined by the client, as part of the code that determines which room should be active. Seamless transitions only happen while in character mode, and is based on the character's position, not the camera's.
Area instances are parallel across transitions. When the character is in instance 42 of SeamlessTutorial_1, he will be linked to instance 42 of SeamlessTutorial_2. If more flexible linkage is required, such as travelling between a common area and an instanced dungeon, a Seamless World 1.0 link is necessary, or any other custom script implemented solution.
The following Seamless 2.0 callbacks belong to _BaseClientClassMethods:
_Area_SeamlessMove( fromArea as ID, fromInstance as ID, toArea as ID, toInstance as ID)
Called at the beginning of a seamless move before the new area has been activated and prior to reference frame adjustment. If you want to do additional steps when a character seamlessly transitions you would use the HE_Area_SeamlessMove override _Area_SeamlessMove Provides.
_Client_Seamless_Transition(newArea as ID, offset as Vector3)
Called when the client switches the active area, just prior to area activation.
_OnLinkedAreaSuspendPreload(areaNumber as ID)
Called when the bounding volume of a linked area falls outside the preload range (15% larger than the distance of the far clipping plane).
_OnLinkedAreaResumePreload(areaNumber as ID)
Called when preloading of a linked area begins or resumes.
_OnLinkedAreaStartRendering(areaNumber as ID)
Called when any room in the linked area begins rendering.
_OnLinkedAreaStopRendering(areaNumber as ID)
Called when there are no longer any rooms in the linked area which are rendering.
_OnLinkedAreaDiet(areaNumber as ID)
Called when a linked area's assets and instances are unloaded from memory as the result of a seamless transition away from the area that linked to it. A minimal amount of area data remains in memory.
Example: area A is linked to area B, and area B is linked to area C. While the player is in area B, areas A and C remain in memory. A few seconds after the player enters area C, area A will be "dieted."