X157 Dev Notes

One simulant attempts to share insight with others.

Game Initialization

The GameMode initializes when a World is loaded. The World Settings defines the GameMode to use and (in Lyra) which Lyra Experience to load by default.

There are different ways a World can come to be loaded, including clicking the “Play In Editor” (PIE) button.

As discussed in more detail in Lyra Experience, unlike other Games, in Lyra you must ensure to delay all game play until OnExperienceLoaded, perhaps long after BeginPlay.

World Load Procedure

World Loading follows this procedure:

Initialize Components of all World Actors

This is implemented by World🡒InitializeActorsForPlay

Init Game Mode

Initialize Components

Initialization of World Actors is in RANDOM ORDER.

When the GameMode is initialized, it does:

Player Login

World BeginPlay

Load Lyra Experience

In PIE, the World’s Default Lyra Experience gets loaded on the tick after GameMode🡒InitGame.

In Game, the appropriate Lyra Experience is loaded by the Frontend State Component (or your similar Game State Component).

Experience Load Procedure

For full details, see Experience Loading Procedure