text
stringlengths
0
17.2k
3.0
APlayerController
3.0
ViewPos
Position of the viewer.
ViewDir
Direction the viewer is facing.
Viewer
Network object owned by the client for whom network priority is being determined. This is usually a Player Controller.
ViewTarget
Actor currently viewed or controlled by Viewer. This is usually a Pawn.
InChannel
Channel on which this actor is being replicated.
Time
Time since this actor was last replicated.
bLowBandwidth
True if the viewer has low bandwidth.
CLOSEPROXIMITY
500
NEARSIGHTTHRESHOLD
2000
MEDSIGHTTHRESHOLD
3162
FARSIGHTTHRESHOLD
8000
GetNetPriority
Used to prioritize actors when deciding which actors to replicate.
GetReplayPriority
Similar to GetNetPriority. Used for prioritizing actors while recording a replay.
bNetUseOwnerRelevancy
If this actor has a valid owner, call the owner's IsNetRelevantFor and GetNetPriority.
NetPriority
Priority for this actor when checking for replication in a low bandwidth or saturated situation. Higher priority means it is more likely to replicate.
Remarks
These constant definitions can be found inNetworkingDistanceConstants.h.
Abilities in Lyra
Lyra uses the Gameplay Ability System (GAS) to orchestrate most of its gameplay. Abilities can be innate to hero data like jump, granted from an action like a Game feature, gained through Experience, or granted from Equipment.
The Gameplay Ability System is a plugin that provides a framework for quickly implementing and iterating on gameplay mechanics. When writing code for complex gameplay mechanics that can include multiplayer, you may write a lot of common boilerplate functionality that applies over many different game types.
GAS attempts to abstract mechanics into common game design patterns, and provides a framework that solves common gameplay implementation problems while letting context vary from project to project.
Writing boilerplate code is often error-prone and time consuming, especially for multiplayer games. For example, you don't want to spend a significant amount of time ensuring your Health values are replicating correctly, or copying the same lines of code over when you decide to have an Energy value that behaves identically.
The GAS addresses these issues by providing a foundation that fulfills common gameplay functionality as much as possible, while staying mechanic-neutral. Instead of forcing concepts such as Health, Ammo, Melee Attack, or Poison Debuff, GAS provides tools to define, replicate, and work with Attributes, Abilities, and Effects, which can then be specialized to fulfill the needs of the given gameplay mechanic.
Lyra implements abilities for common actions such as using weapons, movement-related actions like jumping and dashing, and passive listening actions such as triggering respawn after death. Abilities are also used for less obvious purposes such as summoning match information UI or managing gameplay phases. These are detailed in sections below.
GAS is structured around the following core classes. Lyra extends many of these to provide additional functionality:
The main benefits of GAS are:
Network Replication: You don't need to worry about ensuring your attributes or debuffs are applying or replicating properly. GAS takes care of the inner logic for you.
Modularity: Adding or changing game mechanics is often as easy as implementing and granting a new ability. By breaking down gameplay functionality into separate assets, the ability system can provide a common communication layer between radically different game objects or mechanics. For example, Health can be compartmentalized into its own Attribute Set and interacted with through Gameplay Effects from a variety of systems.
Fast iteration: GAS makes it easy to change individual game rules without the need to modify the entire system. Data sources for game calculations can be easily swapped, and changing the consequences of an action can be modified from the corresponding Gameplay Effect.
The Lyra Ability System Component (ULyraAbilitySystemComponent) extends the Ability System Component (UAbilitySystemComponent) functionality to interface with the Lyra framework. It is added to all LyraPlayerState instances and can be found in your c:Lyra\Source\LyraGame\AbilitySystem\LyraAbilitySystemComponent.h file directory.
Lyra Player States(ALyraPlayerState) own the Ability System Components used for all player-specific abilities and behaviors. Human players and AI bots will each have one. You can access this class in your c:\Lyra\Source\LyraGame\Player\LyraPlayerState.h file directory. The main benefit of adding an Ability System Component to the Player State class is that it helps separate the GAS state logic from the underlying Pawn data.
Separating this logic is useful in games where the player's Pawn will need to often be respawned, or if a Player is switching control between multiple Pawns, or in instances of gameplay where they may not currently be in possession of a Pawn.