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

2024 ж. 28 Сәу.
187 811 Рет қаралды

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.
00:00 - Introduction: The game loop
01:13 - Unreal's scary initialization code
02:35 - GuardedMain and FEngineLoop
03:09 - PreInit: loading engine, project, and plugin modules (IModuleInterface, UObject)
05:17 - Init: Creating and starting the Engine (UEngine / UGameEngine)
07:34 - Engine initialization (UGameInstance, UGameViewportClient, ULocalPlayer)
09:24 - LoadMap: Reloading the world from disk (UWorld, ULevel)
11:18 - LoadMap: Bringing the world up for play (AGameModeBase, AGameStateBase, AGameSession)
14:10 - LoadMap: Logging the player into the game (APlayerController, APlayerState, UPlayer / UNetConnection)
15:54 - LoadMap: Restarting the player (APawn, APlayerStart, AController / AAIController)
18:11 - LoadMap: Routing the BeginPlay event (AWorldSettings)
18:43 - Animated callstack summary
21:55 - Base game mode classes (AGameMode, AGameState)
22:36 - Characters and Pawns (ACharacter, UCharacterMovementComponent)
24:02 - Where to specify custom subclasses
25:32 - Delegates and subsystems (UGameInstanceSubsystem, UWorldSubsystem)
26:42 - Conclusion
Patreon: / alexforsythe
Twitter: / alexforsythe
#UnrealEngine #UE4 #programming

Пікірлер
  • This video must be protected at all costs!

    @CinematographyDatabase@CinematographyDatabase3 жыл бұрын
    • Yup!

      @mjmartinez7@mjmartinez72 жыл бұрын
    • Bro... I've been following your project for a while now (years) and every time I find a nugget of Gold, you have always been here first. I would pay you money to get your learning links!

      @Dazza_Doo@Dazza_Doo Жыл бұрын
  • I absolutely love your method of explaining Unreal concepts. Short, concise, no "HEY IT'S YA BOI" nonsense that makes me immediately look for another video. Just straightforward and professional. It's a breath of fresh air.

    @ekimr90@ekimr905 ай бұрын
  • I really think Epic needs to promote/support/sponsor/hire you to do videos for them. Like Unity did with Brakeys. These are the most in-depth and clearest videos I have seen on UE4 ever. UE4 lacks a lot of good in depth tutorials and videos. Glad you are filling that gap!

    @beanboy504@beanboy5043 жыл бұрын
    • y e s

      @randomexplosion6527@randomexplosion6527 Жыл бұрын
    • yeah . we need more educational stuff like this

      @wafi5576@wafi5576 Жыл бұрын
    • Agree 😂

      @NicoleSummer8@NicoleSummer8 Жыл бұрын
    • He used to be an engineer @ Epic Games

      @divyanshkhare@divyanshkhare Жыл бұрын
    • 2 years later this is still true! Would love for him to do a UE5 series sponsored by Epic

      @jak3legacy@jak3legacy Жыл бұрын
  • Alex, I hope you return to making Unreal Engine videos like this someday. They truly have changed the trajectory of my career (Student currently). For some people, videos like these make the difference between being overwhelmed by the mountain of knowledge needed for game dev and finding your footing and gradually being able to scale that mountain with confidence. You gave me that and I am sincerely grateful. Thank you.

    @hasanjamal3574@hasanjamal3574 Жыл бұрын
  • My GOODNESS! Been using UE4 for 5 years and this might be the best video I've seen on the core of how the engine works. A+

    @Rubberglass@Rubberglass3 жыл бұрын
    • I'm just watching this for fun at this point. The attention to detail the quality. I've i think never seen such a good programming video ever. I'm programming now for about 10 years.

      @kevindt100@kevindt1002 жыл бұрын
  • It's criminal how few views this video has so far. I want to come back in six months and see at least 10k. Epic should promote your videos.

    @greyly_@greyly_3 жыл бұрын
    • And they did :)

      @Kingu__@Kingu__3 жыл бұрын
    • And it hit 10k.

      @greyly_@greyly_3 жыл бұрын
    • now it does have 10k and its been only a month :)

      @Grenader1995@Grenader19953 жыл бұрын
    • If you want views and subs on YT, give them cats, farts or some top ten crap. That's the nature of YT and society as a whole in general, unfortunately.

      @squarerootof2@squarerootof23 жыл бұрын
  • This is the best Unreal programming related video ever made, and is still valid in the era of UE5.

    @kumituubi@kumituubiАй бұрын
  • This is the masterpiece that all other Unreal videos should be judged against. Flawless. Thank you for creating this!

    @jeggie@jeggie7 ай бұрын
  • Having spent the past 7-8 years in Unreal Engine 4 - I can say without a doubt, this is the best piece of educational content I have seen for the engine (Sorry Mathew, I still love you!). Keep up the great work!

    @KITATUS@KITATUS3 жыл бұрын
    • Mathew’s videos are good to get a grasp on blueprints. This guy has been working in unreal engine since early days of the commercial engine. So he knows, and he is a really good software engineer.

      @TrojanLube69@TrojanLube693 жыл бұрын
  • This is a class that has to be presented to game engine developers when they get hired by epic.

    @TrojanLube69@TrojanLube693 жыл бұрын
  • This video is so underrated. Your channel should receive Epic MegaGrants.

    @nakedsingularity@nakedsingularity7 ай бұрын
  • This is one of the rarest video of UE. When dealing with huge source repo like UE you actually need this kind of video to understand overall picture of why things are the way it is. This definitely gives lot of confidence if you plan to update engine. Unfortunately the guy seems busy with other stuff as his channel seems inactive from about an year.

    @yashkhd1100@yashkhd1100 Жыл бұрын
  • This is fantastic! Super thorough and well visualized so all these dense concepts are easy to follow along with. A+ this demystifies a lot of the code flow that is difficult to figure out for newbies. (I'll add this video to my written gameplay framework guide, which isn't nearly as detailed as this)

    @tom.looman@tom.looman3 жыл бұрын
    • Thanks for the shout-out!

      @AlexForsythe@AlexForsythe3 жыл бұрын
    • I love to see a legend recognize another legend.

      @Developer-tx9uf@Developer-tx9uf2 жыл бұрын
    • When Tom comments a video, you know you done something right :P

      @CHADALAK1@CHADALAK12 жыл бұрын
  • Alex, I've been watching a ton of your videos the past 6 months or so as I've been learning Unreal for my own projects, and I wanted to share that I just got my first professional job in game dev, in part due to the projects I've built in Unreal. So, thanks for all the help in that process. I've still got a long ways to go in learning, but getting my foot in the door here will allow me to genuinely make a career out of game dev! I'm super excited for the future.

    @grey3318@grey3318 Жыл бұрын
  • This is exactly the kind of video that's just not found anywhere else. It's straight to the point and no irrelevant tangents trying to cram in a C++ tutorial. Whenever I hear "For those that don't already know..." in a video, it's a cue to scrub ahead until I get to the actual *point* of the video and it drives me crazy. Thank you for being respectful of our time.

    @wesc6755@wesc67553 жыл бұрын
  • I've been using UE4 for three years and this video cleared up so much, I can't believe I didn't find something like this sooner. Very thorough, and incredibly high-quality walkthrough of the game loop. Hats off to you!

    @harshamohite1289@harshamohite12892 жыл бұрын
  • I’ve needed this! I’ve been banging my head against a wall not understanding how the engine was designed, now it’s all making sense!

    @joshuamcmillan6390@joshuamcmillan63904 ай бұрын
  • Hi from the Unreal Engine CIS community, thanks for your hard work, it very helpful!

    @watcover3396@watcover33963 жыл бұрын
  • A bit sad that I only discovered this series when it has been long finished Desevers so much more love. Hands down the best high level unreal tutorials I have ever come across.

    @JellyfishJNM@JellyfishJNM29 күн бұрын
  • A month ago, I started creating a game only based on C++, no blueprints, and this goal led me to watch (for now) nearly 50 videos about UE4. But man, this video's the only one who needs to be watched before starting anything else. That's the entry point of the universe. The framework is really well explained and detailed, and it helped me to get a different approach about my game conception. I have stumbled on this tutorial almost by accident, but it's like discovering a tiny shiny diamond in a wild and inextricable maze.

    @P4nd0@P4nd02 жыл бұрын
  • You sir have put my videos to shame. Excellent work!

    @reubs@reubs3 жыл бұрын
    • Dont be so harsh on yourself. I am learning a lot from your videos as well. Both of you are fantastic

      @behrampatel3563@behrampatel35632 жыл бұрын
  • Way so underrated! This deserves more views

    @TrojanLube69@TrojanLube693 жыл бұрын
  • This is probably the best video I've ever seen about the UE framework and I've looked at hundreds. Epic should use this as a primer for new users and include it in the docs.

    @marckleise6436@marckleise64363 жыл бұрын
  • This is by far the best overview of UE4 internals that has ever been done! I never would have found this if it hadn't shown up on Epics site. Thank You!

    @Ranger75th@Ranger75th3 жыл бұрын
  • An absolutely excellent breakdown of Unreal. Well done, man. Can't tell you how much new people to Unreal benefit from these types of videos.

    @johnrex7108@johnrex7108Ай бұрын
  • This is pure gold. This SHOULD be promoted

    @MarkerInteractive@MarkerInteractive3 жыл бұрын
  • The analogy about how ancient codebases start up and the big bang is a kind of a transcendent realisation, to me at least. Great stuff.

    @calccalccalc@calccalccalc11 ай бұрын
  • It felt like I was hired by Epic and you were on boarding me... Thanks so much!

    @markyoshikawa4278@markyoshikawa42783 жыл бұрын
  • From a software engineer's point of view who recently started studying UE and game making, I'd say your videos are one of the best out there. I really think UE should hire people like you to create solid documentation and educational videos that touch these topics with the needed depth.

    @LionKing25302@LionKing25302 Жыл бұрын
  • Is this the ultimate C++ guide ive been looking for for 10 years?

    @SinanAkkoyun@SinanAkkoyun2 жыл бұрын
  • This channel is a real hidden gem. It's great exposure for someone like me who just started studying software engineering.

    @BudgiePanic@BudgiePanic2 жыл бұрын
  • Excellent - Complex yet Concise - Engaging Visualizations - Essential Principles - and clearly Transcendent - May I have another !

    @KRN1VOR@KRN1VOR3 жыл бұрын
  • The UE community needs you.

    @Developer-tx9uf@Developer-tx9uf2 жыл бұрын
  • As you mentioned in the outro, the animated graphics are really amazing. Honestly, giving people a way to visualise what the code is doing that isn't lines of code is one of the best ways to help people understand and differentiate what is actually going on in a logical way. Thanks for all your hard work Alex!

    @QuackTeamJames@QuackTeamJames3 жыл бұрын
    • Also, if you have noticed.. look at the color coding of the checkpoints, pawn are outlined as Green circle, and others with other colour. So much detailed.

      @PabitraPadhy@PabitraPadhy2 жыл бұрын
  • Your presentation skill is remarkable.

    @PixelPulse168@PixelPulse1688 ай бұрын
  • as newbie...i literally understand .1 % of this video....but still loved every second of it

    @teemuleppa3347@teemuleppa33472 жыл бұрын
  • that's really good description for the programming (engineering) in a nutshell : you just woke up 1 frame after the big bang and you first need to define yourself as something while there's not even a term "something" and a word "define".

    @Strelokos666@Strelokos666 Жыл бұрын
  • You are a major component of why the human species will progress

    @nsgoneape9899@nsgoneape9899 Жыл бұрын
  • From somebody who learned this on his own: This video is the best entry point if you want unreal from scratch!

    @CompanionCube@CompanionCube2 жыл бұрын
  • Unreal should hire you for all of their tutorial videos. Your work is exceptional. Thank you!

    @unrelic4988@unrelic4988 Жыл бұрын
  • This has to be the single most useful Unreal Engine video on KZhead. Nothing else I can say really, amazing work!

    @TheWebDrake@TheWebDrake2 жыл бұрын
  • I've only watched one other video and only 2 minutes of this one, but I can already say your videos are on another level than anything else when it comes to explaining things

    @jdigi78@jdigi782 жыл бұрын
  • the pace is freaking high but the explanation itself is very useful. Thank you!

    @barelyvisibl@barelyvisibl Жыл бұрын
  • Hands down the MOST INFORMATIVE video on UE.

    @keithlarsson4264@keithlarsson4264 Жыл бұрын
  • Thank you for this detailed rundown!

    @kjiggity300@kjiggity3003 жыл бұрын
  • incredibly good visualizations! amazing work!

    @iPwnN00bsTC@iPwnN00bsTC3 жыл бұрын
  • This guy knows his shit. Mindblowingly thorough and accurate.

    @invntiv@invntiv Жыл бұрын
  • Wow! This is absolutely amazing!

    @janlucsaneaux1915@janlucsaneaux19153 жыл бұрын
  • An actual person has actually broken through the main loop of the engine. That's world news. Subed.

    @sgtbooz@sgtbooz2 жыл бұрын
  • I've been looking for this for several years, thank you

    @LeozorDub@LeozorDub2 жыл бұрын
  • Amazing, in-depth material with great presentation. Thank you!

    @b.laciak8175@b.laciak81752 жыл бұрын
  • Incredible explanation. This is really fantastic work!

    @adamkareem@adamkareem3 жыл бұрын
  • Simply amazingly put together. Many thanks for that hard work!

    @thoeme@thoeme3 жыл бұрын
  • Absolutely incredible video, amazingly well done!

    @danielorchard6404@danielorchard64043 жыл бұрын
  • Why did I not find you all these years !!! Class Apart content

    @gamebird9640@gamebird964011 ай бұрын
  • This is the best video on Unreal Engine architecture available out there bar none.

    @MikeLeed@MikeLeed10 ай бұрын
  • This is criminally underviewed for how much effort would have gone into making this

    @HojuMedia@HojuMedia Жыл бұрын
  • Fantastic video! Very well made!

    @bibbisbibbis@bibbisbibbis Жыл бұрын
  • I can't give this video enough thumbs-up! Well presented and compact.

    @cthutu@cthutu2 жыл бұрын
  • This is phenomenally well explained, the graphics and sequence of topics flowed in a way that made this enoyable to digest. Nice work!

    @ericfear@ericfear3 жыл бұрын
  • This is so helpful! Thank you!! 👏🏻👏🏻👏🏻

    @tim_arterbury@tim_arterbury3 жыл бұрын
  • Awesome work mate! Very comprehensive! Thank you!!

    @OGU44@OGU447 ай бұрын
  • Just amazing! Thank you!

    @duke6800@duke68008 ай бұрын
  • Outstanding quality, extremely helpful! Thanks a lot for this!

    @Beriol9@Beriol93 жыл бұрын
  • Incredible video. It's unbelievable how useful it is.

    @igorzhironkin2231@igorzhironkin22312 жыл бұрын
  • incredible work. incredible. just massive

    @seventfour9247@seventfour9247 Жыл бұрын
  • Brilliant video! Thanks so much for doing such a detailed overview

    @anastasiaionicioiu1456@anastasiaionicioiu14562 жыл бұрын
  • That is exactly the explanation I needed.

    @redfruit1993z@redfruit1993z Жыл бұрын
  • Thank you so much for providing such a high quality course!

    @guanzhongli6249@guanzhongli62492 жыл бұрын
  • I found this tutorial incredibly helpful.

    @drakouzdrowiciel9237@drakouzdrowiciel923720 күн бұрын
  • Nice video! Thanks for all the effort to put this together

    @ayrtonolvera4222@ayrtonolvera42226 ай бұрын
  • Stellar work here, and eminently useful. Bravo sir!

    @theceruleandolphin2829@theceruleandolphin2829 Жыл бұрын
  • absolutely astounding quality. thank you

    @alwayssadbuttruthful@alwayssadbuttruthful7 ай бұрын
  • Another essentials reference video to bookmark and re-watch later. Your videos are beginning to creepily occupy all my Unreal bookmarks. At this time my worry is that there are too little of them. Thanks again.

    @estranhokonsta@estranhokonsta Жыл бұрын
  • This was an amazing video! The visuals made it really pedagogical and thorough, helped me crack a difficult problem!

    @TheWhoopah@TheWhoopah Жыл бұрын
  • As always, amazing content Alex. Love how you use those animations to accompany the verbal message. Super informative and very inspiring to watch and listen to. I've been trying to wrap my head around how the engine boots up for quite a while and never fully managed to keep focus to understand how it ever reached BeginPlay. I will for sure be rewatching this video a few times, but damn good job at explaining it from start to end.

    @jonasmlgaard8884@jonasmlgaard88843 жыл бұрын
  • Thank you so much for making this video, it is fantastically well done.

    @alexbarcelo9592@alexbarcelo95923 жыл бұрын
  • I love this! Thank you very much for such a comprehensive detailed explanation!

    @alirezanajafi1759@alirezanajafi1759 Жыл бұрын
  • Amazing video! Thanks for all the efforts!

    @spacewanderer550@spacewanderer550 Жыл бұрын
  • Hoooly, this is a very well put together video! Thank you! This should be featured in the official UE docs :)

    @rolandbalogh889@rolandbalogh8893 жыл бұрын
  • Unbelievable work! So informative and detailed. I was so amazed to see such a good presentation with such flawless animations and simplicity.

    @bub1ick@bub1ick3 жыл бұрын
  • Holy shit, this is awesome! as someone working with the source code on daily basis I wish I had seen this video before. Please continue making similar videos

    @zoser@zoser3 жыл бұрын
  • Amazing work. Thanks for your effort and congrats for such high quality content. 👏👏👏👏👏

    @PuraTvOyun@PuraTvOyun3 жыл бұрын
  • Thank you for making this!

    @StevenDiLeo@StevenDiLeo2 жыл бұрын
  • Wow this reduces anxiety. So soothing!

    @JordanService@JordanService Жыл бұрын
  • Sir, your videos are by far the most well made and well explained on youtube. Thank you for taking the time to make those.

    @Krustachu@Krustachu3 жыл бұрын
  • This is the best piece of UE content I've ever seen. Thank you.

    @Dan-gt3ov@Dan-gt3ov Жыл бұрын
  • I recently started thinking about using unreal engine to make my first game and honestly had no idea how Unreal Engine worked. This video is a godsend for people with a basic understanding of C++.

    @Raul-ye6kz@Raul-ye6kz3 жыл бұрын
  • I have no idea how I got here, but I wish it happened earlier. Thank you so much for this video!

    @TalisBarbalho@TalisBarbalho2 жыл бұрын
  • Not a single dislike on this video! So informative.

    @jakedubs@jakedubs3 жыл бұрын
  • Best video I've found on Unreal engine by a long shot. Hats off to you, brother.

    @SherajusSalehin@SherajusSalehin8 ай бұрын
  • such an underrated channel

    @peterino2@peterino22 жыл бұрын
  • Perfect explanation for engine starter!

    @user-fr3it7zo5s@user-fr3it7zo5s8 ай бұрын
  • Awesome work! This might be the most important video about the UnrealEngine I've ever seen so far. I always had an idea about what happened when, but to actually run down the command chain to see what object is available at what time is priceless knowledge. Thank you very much to present this complex topic in that easily comprehensible way!

    @alekelpragh@alekelpragh3 жыл бұрын
  • Gotta say this one of the (if not the) best programming breakdowns I've ever seen, really excellent work. A shame it seems you've stopped making videos, this is brilliant.

    @amilani4@amilani46 ай бұрын
  • I've watched so many programming videos and this is by far one of the best.

    @thoril.pegason@thoril.pegason Жыл бұрын
  • Best UE video ever made.

    @vince4417@vince441726 күн бұрын
  • Exceptional work!

    @LuccasSchmigel@LuccasSchmigel3 жыл бұрын
  • Why there are no more videos like this? Holy shit this is pure gold for someone who wants to be great in UE! Thank you so much!

    @romantimoshenko5570@romantimoshenko55702 жыл бұрын
  • This is a really well made video

    @brianfreemann174@brianfreemann1743 жыл бұрын
KZhead