Gameplay Framework

Core systems, such as game rules, player input and controls, cameras, and user interfaces

The Gameplay Framework in Unreal Engine provides multiple classes and components to serve as building blocks for your projects.

  • Actors are the base class for an Object that can be placed or spawned in a level. Actors may contain a collection of Actor Components, which can be used to control how actors move, and how they are rendered. Actors support the replication of properties and function calls across the network during play.

  • Cameras represent the player's point of view, such as how the player sees the world. The PlayerController specifies a camera class and instantiates a Camera Actor which is used to calculate the position and orientation the player views the world from.

  • The Pawn class is the base class of all Actors that can be controlled by players or AI. A Pawn is the physical representation of a player or AI entity within the world. A Character is a special type of Pawn that has the ability to walk around. By default, there is a one-to-one relationship between Controllers and Pawns; meaning, each Controller controls only one Pawn at any given time.

  • Controllers are non-physical Actors that can possess a Pawn or Pawn-derived class like a Character to control its actions. A Player Controller is used by human players to control Pawns, while an AI Controller implements the artificial intelligence for the Pawns they control. Controllers take control of a Pawn with the Possess function and give up control of the Pawn with the UnPossess function.

  • Gameplay Timers create asynchronous callbacks to specific function pointers that trigger events to be performed after a delay, or over a period of time.

  • The base of the game framework is the GameMode. AGameModeBase actor is instantiated when the level is initialized for gameplay. The GameMode sets the rules for the game, It is only instanced on the server and will never exist on the client.

  • The Game Features and Modular Gameplay plugins help developers create standalone features for their projects. These plugins keep your project's codebase clean and readable and avoid accidental interactions or dependencies between unrelated features.

  • [User Interfaces (UIs) and Heads-up Displays (HUDs)](making-interactive-experiences\umg-user-interface)
    are a way of providing information about the game to the player and in some cases allowing the player to interact with the game.

Framework Class Relationships

This flowchart illustrates how these core gameplay classes relate to each other. A game is made up of a GameMode and GameState. Human players joining the game are associated with PlayerControllers. These PlayerControllers allow players to possess pawns in the game so they can have physical representations in the level. PlayerControllers also give players input controls, a heads-up display, or HUD, and a PlayerCameraManager for handling camera views.

GameFramework.png

Section Topic Directory

Help shape the future of Unreal Engine documentation! Tell us how we're doing so we can serve you better.
Take our survey
Cancel