Skip to content
0:00 / 0:00

#unrealengine#gameframework#initialization

The Unreal Engine Game Framework: From int main() to BeginPlay

Alex Forsythe

30K subscribers • 1 video on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • A classic. People kept recommending it from 2021 to 2026.
  • Presented by Alex Forsythe

Intermediate. Assumes working knowledge.

287K views5 years ago2 recommendations

Game developmentSystems programmingUnity, Unreal and GodotBuilding a game engine

Alex Forsythe explains the initialization process of Unreal Engine, tracing the execution path from the main entry point to the start of gameplay.

What happens when you start up your Unreal Engine game? This video is a guided tour of the Engine's initialization process: along the way, we'll glimpse the high-level structure of the Engine (modules, game instances, local players, and viewports) and we'll see how all the different parts of the Game Framework (game modes, game states, player controllers, and the like) fit together. - Introduction: The game loop - Unreal's scary initialization code - GuardedMain and FEngineLoop - PreInit: loading engine, project, and plugin modules (IModuleInterface, UObject) - Init: Creating and starting the Engine (UEngine / UGameEngine) - Engine initialization (UGameInstance, UGameViewportClient, ULocalPlayer) - LoadMap: Reloading the world from disk (UWorld, ULevel) - LoadMap: Bringing the world up for play (AGameModeBase, AGameStateBase, AGameSession) - LoadMap: Logging the player into the game (APlayerController, APlayerState, UPlayer / UNetConnection) - LoadMap: Restarting the player (APawn, APlayerStart, AController / AAIController) - LoadMap: Routing the BeginPlay event (AWorldSettings) - Animated callstack summary - Base game mode classes (AGameMode, AGameState) - Characters and Pawns (ACharacter, UCharacterMovementComponent) - Where to specify custom subclasses - Delegates and subsystems (UGameInstanceSubsystem, UWorldSubsystem) - Conclusion Patreon: patreon.com/alexforsythe Twitter: twitter.com/alexforsythe #UnrealEngine #UE4 #programming

Why it's here

2 people recommend this

What people say. Recommended as a clear explanation of Unreal Engine's initialization process and high-level architecture.

u/pastacesticidein r/gameenginedevs • Recommends

On “Should the game engine have main() or the game?”

I recommend you this video if you want to learn about the unreal implementation [video

u/illyayin r/gameenginedevs • Recommends

On “A game engine inspired by Java's "Write once run anywhere"”

I mostly only try to understand the parts I need. I dove deep into parts of the animation code when working animation stuff and added some custom anim graph nodes. Then there’s other parts of the code I’m not sure I’ll ever touch. This could also help. A video that goes from main() to beginplay. Could be good for any engine dev to check out. link to this video

u/Super_Kiwi_4862in r/GraphicsProgramming • Mentions

On “Resources for Modifying Existing (Unreal) Renderer?”

I am also an advocat for both. Most of the engine architectures has been pretty much streamlined over the years https://docs.vulkan.org/tutorial/latest/Building_a_Simple_Engine/introduction.html gives you a simple overview. In general, what is great about UE and Godot is, you have access to the source code, and can directly read up what is going on. Alex Forsyth has a great yt video about the start up loop from UE. After watching this, the rendering code isn't far away.