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

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 พ.ค. 2024
  • 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

ความคิดเห็น • 328

  • @CinematographyDatabase
    @CinematographyDatabase 3 ปีที่แล้ว +345

    This video must be protected at all costs!

    • @mjmartinez7
      @mjmartinez7 2 ปีที่แล้ว +1

      Yup!

    • @Dazza_Doo
      @Dazza_Doo 2 ปีที่แล้ว +1

      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!

  • @beanboy504
    @beanboy504 3 ปีที่แล้ว +364

    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!

    • @randomexplosion6527
      @randomexplosion6527 ปีที่แล้ว +6

      y e s

    • @wafi5576
      @wafi5576 ปีที่แล้ว +3

      yeah . we need more educational stuff like this

    • @NicoleSummer8
      @NicoleSummer8 ปีที่แล้ว

      Agree 😂

    • @divyanshkhare
      @divyanshkhare ปีที่แล้ว +2

      He used to be an engineer @ Epic Games

    • @jak3legacy
      @jak3legacy ปีที่แล้ว +2

      2 years later this is still true! Would love for him to do a UE5 series sponsored by Epic

  • @ekimr90
    @ekimr90 6 หลายเดือนก่อน +12

    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.

  • @Rubberglass
    @Rubberglass 3 ปีที่แล้ว +176

    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+

    • @kevindt100
      @kevindt100 2 ปีที่แล้ว +3

      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.

  • @kumituubi
    @kumituubi 2 หลายเดือนก่อน +6

    This is the best Unreal programming related video ever made, and is still valid in the era of UE5.

  • @greyly_
    @greyly_ 3 ปีที่แล้ว +65

    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.

    • @Kingu__
      @Kingu__ 3 ปีที่แล้ว +4

      And they did :)

    • @greyly_
      @greyly_ 3 ปีที่แล้ว +1

      And it hit 10k.

    • @Grenader1995
      @Grenader1995 3 ปีที่แล้ว

      now it does have 10k and its been only a month :)

    • @squarerootof2
      @squarerootof2 3 ปีที่แล้ว +2

      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.

  • @hasanjamal3574
    @hasanjamal3574 ปีที่แล้ว +46

    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.

  • @tom.looman
    @tom.looman 3 ปีที่แล้ว +273

    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)

    • @AlexForsythe
      @AlexForsythe  3 ปีที่แล้ว +30

      Thanks for the shout-out!

    • @Developer-tx9uf
      @Developer-tx9uf 2 ปีที่แล้ว +12

      I love to see a legend recognize another legend.

    • @CHADALAK1
      @CHADALAK1 2 ปีที่แล้ว +4

      When Tom comments a video, you know you done something right :P

  • @jeggie
    @jeggie 8 หลายเดือนก่อน +4

    This is the masterpiece that all other Unreal videos should be judged against. Flawless. Thank you for creating this!

  • @yashkhd1100
    @yashkhd1100 ปีที่แล้ว +7

    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.

  • @KITATUS
    @KITATUS 3 ปีที่แล้ว +60

    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!

    • @TrojanLube69
      @TrojanLube69 3 ปีที่แล้ว +5

      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.

  • @wesc6755
    @wesc6755 3 ปีที่แล้ว +5

    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.

  • @grey3318
    @grey3318 ปีที่แล้ว +15

    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.

  • @TrojanLube69
    @TrojanLube69 3 ปีที่แล้ว +27

    This is a class that has to be presented to game engine developers when they get hired by epic.

  • @P4nd0
    @P4nd0 2 ปีที่แล้ว +4

    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.

  • @nakedsingularity
    @nakedsingularity 8 หลายเดือนก่อน +3

    This video is so underrated. Your channel should receive Epic MegaGrants.

  • @watcover3396
    @watcover3396 3 ปีที่แล้ว +5

    Hi from the Unreal Engine CIS community, thanks for your hard work, it very helpful!

  • @TrojanLube69
    @TrojanLube69 3 ปีที่แล้ว +16

    Way so underrated! This deserves more views

  • @reubs
    @reubs 3 ปีที่แล้ว +6

    You sir have put my videos to shame. Excellent work!

    • @behrampatel3563
      @behrampatel3563 2 ปีที่แล้ว +1

      Dont be so harsh on yourself. I am learning a lot from your videos as well. Both of you are fantastic

  • @harshamohite1289
    @harshamohite1289 3 ปีที่แล้ว +15

    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!

  • @JellyfishJNM
    @JellyfishJNM หลายเดือนก่อน +1

    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.

  • @markyoshikawa4278
    @markyoshikawa4278 3 ปีที่แล้ว +4

    It felt like I was hired by Epic and you were on boarding me... Thanks so much!

  • @marckleise6436
    @marckleise6436 3 ปีที่แล้ว +7

    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.

  • @calccalccalc
    @calccalccalc ปีที่แล้ว +1

    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.

  • @KRN1VOR
    @KRN1VOR 3 ปีที่แล้ว +2

    Excellent - Complex yet Concise - Engaging Visualizations - Essential Principles - and clearly Transcendent - May I have another !

  • @Ranger75th
    @Ranger75th 3 ปีที่แล้ว +11

    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!

  • @MarkerInteractive
    @MarkerInteractive 3 ปีที่แล้ว +8

    This is pure gold. This SHOULD be promoted

  • @LionKing25302
    @LionKing25302 ปีที่แล้ว +2

    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.

  • @QuackTeamJames
    @QuackTeamJames 3 ปีที่แล้ว +21

    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!

    • @PabitraPadhy
      @PabitraPadhy 2 ปีที่แล้ว +1

      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.

  • @BudgiePanic
    @BudgiePanic 2 ปีที่แล้ว +1

    This channel is a real hidden gem. It's great exposure for someone like me who just started studying software engineering.

  • @invntiv
    @invntiv ปีที่แล้ว

    This guy knows his shit. Mindblowingly thorough and accurate.

  • @johnrex7108
    @johnrex7108 2 หลายเดือนก่อน +1

    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.

  • @MikeLeed
    @MikeLeed 11 หลายเดือนก่อน

    This is the best video on Unreal Engine architecture available out there bar none.

  • @joshuamcmillan6390
    @joshuamcmillan6390 5 หลายเดือนก่อน +1

    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!

  • @CompanionCube
    @CompanionCube 3 ปีที่แล้ว +1

    From somebody who learned this on his own: This video is the best entry point if you want unreal from scratch!

  • @keithlarsson4264
    @keithlarsson4264 ปีที่แล้ว

    Hands down the MOST INFORMATIVE video on UE.

  • @jdigi78
    @jdigi78 2 ปีที่แล้ว +2

    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

  • @zoser
    @zoser 3 ปีที่แล้ว +3

    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

  • @nsgoneape9899
    @nsgoneape9899 ปีที่แล้ว

    You are a major component of why the human species will progress

  • @sgtbooz
    @sgtbooz 2 ปีที่แล้ว +1

    An actual person has actually broken through the main loop of the engine. That's world news. Subed.

  • @unrelic4988
    @unrelic4988 ปีที่แล้ว +1

    Unreal should hire you for all of their tutorial videos. Your work is exceptional. Thank you!

  • @Strelokos666
    @Strelokos666 ปีที่แล้ว

    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".

  • @kjiggity300
    @kjiggity300 3 ปีที่แล้ว +1

    Thank you for this detailed rundown!

  • @LeozorDub
    @LeozorDub 2 ปีที่แล้ว

    I've been looking for this for several years, thank you

  • @TheWebDrake
    @TheWebDrake 2 ปีที่แล้ว +2

    This has to be the single most useful Unreal Engine video on TH-cam. Nothing else I can say really, amazing work!

  • @ayrtonolvera4222
    @ayrtonolvera4222 7 หลายเดือนก่อน

    Nice video! Thanks for all the effort to put this together

  • @thoeme
    @thoeme 3 ปีที่แล้ว +1

    Simply amazingly put together. Many thanks for that hard work!

  • @bibbisbibbis
    @bibbisbibbis ปีที่แล้ว

    Fantastic video!
    Very well made!

  • @iPwnN00bsTC
    @iPwnN00bsTC 3 ปีที่แล้ว +1

    incredibly good visualizations! amazing work!

  • @danielorchard6404
    @danielorchard6404 3 ปีที่แล้ว +1

    Absolutely incredible video, amazingly well done!

  • @mrhrush4810
    @mrhrush4810 11 หลายเดือนก่อน

    Love these videos. They are super useful. Thanks!

  • @gamebird9640
    @gamebird9640 ปีที่แล้ว

    Why did I not find you all these years !!! Class Apart content

  • @OGU44
    @OGU44 8 หลายเดือนก่อน +1

    Awesome work mate! Very comprehensive! Thank you!!

  • @anastasiaionicioiu1456
    @anastasiaionicioiu1456 3 ปีที่แล้ว

    Brilliant video! Thanks so much for doing such a detailed overview

  • @Beriol9
    @Beriol9 3 ปีที่แล้ว +2

    Outstanding quality, extremely helpful! Thanks a lot for this!

  • @b.laciak8175
    @b.laciak8175 2 ปีที่แล้ว +1

    Amazing, in-depth material with great presentation. Thank you!

  • @adamkareem
    @adamkareem 3 ปีที่แล้ว +1

    Incredible explanation. This is really fantastic work!

  • @wassollderscheiss33
    @wassollderscheiss33 ปีที่แล้ว +1

    Great video. I'm a pro developer and even did my own 3D engine 30 years ago (in asm with 15). I didn't know the Unreal engine internally up until I just saw the first few minutes of your video. I instantly got it. Thanks. I'm kind of shocked that rather bad coding makes such a good engine ;-)

  • @tim_arterbury
    @tim_arterbury 3 ปีที่แล้ว +4

    This is so helpful! Thank you!! 👏🏻👏🏻👏🏻

  • @alwayssadbuttruthful
    @alwayssadbuttruthful 8 หลายเดือนก่อน

    absolutely astounding quality. thank you

  • @guanzhongli6249
    @guanzhongli6249 2 ปีที่แล้ว +1

    Thank you so much for providing such a high quality course!

  • @seventfour9247
    @seventfour9247 2 ปีที่แล้ว

    incredible work. incredible. just massive

  • @barelyvisibl
    @barelyvisibl ปีที่แล้ว

    the pace is freaking high but the explanation itself is very useful. Thank you!

  • @janlucsaneaux1915
    @janlucsaneaux1915 3 ปีที่แล้ว +1

    Wow! This is absolutely amazing!

  • @Raul-ye6kz
    @Raul-ye6kz 3 ปีที่แล้ว +1

    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++.

  • @ericfear
    @ericfear 3 ปีที่แล้ว +4

    This is phenomenally well explained, the graphics and sequence of topics flowed in a way that made this enoyable to digest. Nice work!

  • @PuraTvOyun
    @PuraTvOyun 3 ปีที่แล้ว +1

    Amazing work. Thanks for your effort and congrats for such high quality content. 👏👏👏👏👏

  • @igorzhironkin2231
    @igorzhironkin2231 3 ปีที่แล้ว +1

    Incredible video. It's unbelievable how useful it is.

  • @spacewanderer550
    @spacewanderer550 ปีที่แล้ว

    Amazing video! Thanks for all the efforts!

  • @TalisBarbalho
    @TalisBarbalho 3 ปีที่แล้ว +1

    I have no idea how I got here, but I wish it happened earlier. Thank you so much for this video!

  • @cthutu
    @cthutu 2 ปีที่แล้ว +1

    I can't give this video enough thumbs-up! Well presented and compact.

  • @estranhokonsta
    @estranhokonsta ปีที่แล้ว

    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.

  • @alirezanajafi1759
    @alirezanajafi1759 ปีที่แล้ว

    I love this! Thank you very much for such a comprehensive detailed explanation!

  • @alexbarcelo9592
    @alexbarcelo9592 3 ปีที่แล้ว +1

    Thank you so much for making this video, it is fantastically well done.

  • @jonasmlgaard8884
    @jonasmlgaard8884 3 ปีที่แล้ว +3

    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.

  • @theceruleandolphin2829
    @theceruleandolphin2829 ปีที่แล้ว

    Stellar work here, and eminently useful. Bravo sir!

  • @bub1ick
    @bub1ick 3 ปีที่แล้ว +1

    Unbelievable work! So informative and detailed. I was so amazed to see such a good presentation with such flawless animations and simplicity.

  • @seethe639
    @seethe639 ปีที่แล้ว

    What an absolute treasure of a video... Thank you for making it!

  • @rolandbalogh889
    @rolandbalogh889 3 ปีที่แล้ว +1

    Hoooly, this is a very well put together video! Thank you! This should be featured in the official UE docs :)

  • @HojuMedia
    @HojuMedia ปีที่แล้ว

    This is criminally underviewed for how much effort would have gone into making this

  • @abludungeonmaster5817
    @abludungeonmaster5817 11 หลายเดือนก่อน

    Awesome video. Very helpful

  • @emreakd
    @emreakd 3 ปีที่แล้ว

    Very very useful and detailed videos. Thank you!

  • @JordanService
    @JordanService ปีที่แล้ว

    Wow this reduces anxiety. So soothing!

  • @compromises
    @compromises ปีที่แล้ว

    Your videos help a lot. Thank you very much!

  • @Dan-gt3ov
    @Dan-gt3ov ปีที่แล้ว

    This is the best piece of UE content I've ever seen. Thank you.

  • @TheWhoopah
    @TheWhoopah ปีที่แล้ว

    This was an amazing video! The visuals made it really pedagogical and thorough, helped me crack a difficult problem!

  • @Nico-ew5yv
    @Nico-ew5yv 2 ปีที่แล้ว +1

    Amazing Job ! so much detailed information, thank you :)

  • @antruongsi2544
    @antruongsi2544 ปีที่แล้ว

    I remember the first time I came here, no Idea what you talking about whatsoever, then I learn a bit of C++ and keep coming back, each time I understand a bit more, the later I come back here I need to pause every 2 second to comprehend what you have just said, the video is incredible infomative, thank you is not enough.

  • @SherajusSalehin
    @SherajusSalehin 9 หลายเดือนก่อน +1

    Best video I've found on Unreal engine by a long shot. Hats off to you, brother.

  • @jakedubs
    @jakedubs 3 ปีที่แล้ว +1

    Not a single dislike on this video! So informative.

  • @the-nomad-show
    @the-nomad-show 12 วันที่ผ่านมา

    This was great! Made me understand why things work as they do in UE, thank you!

  • @thoril.pegason
    @thoril.pegason ปีที่แล้ว

    I've watched so many programming videos and this is by far one of the best.

  • @user-fk2yi8er6x
    @user-fk2yi8er6x 5 หลายเดือนก่อน

    This video was very useful, thank you very much

  • @KN-ci4dm
    @KN-ci4dm 3 ปีที่แล้ว +2

    This is a MUST-WATCH.

  • @Keytotruth
    @Keytotruth ปีที่แล้ว

    By far, the best Unreal Engine video ever. It has saved my ass so many times.
    Thank you!

  • @user-fr3it7zo5s
    @user-fr3it7zo5s 9 หลายเดือนก่อน +1

    Perfect explanation for engine starter!

  • @Krustachu
    @Krustachu 3 ปีที่แล้ว +1

    Sir, your videos are by far the most well made and well explained on youtube. Thank you for taking the time to make those.

  • @KillshiftRU
    @KillshiftRU หลายเดือนก่อน

    VERY! usefull video. Probably the most useful i ever seened. I hope u will continue someday 🙏

  • @AmeenAltajer
    @AmeenAltajer 2 ปีที่แล้ว +1

    Best video ever on what happens under the hood, great work man.

  • @disruptive_innovator
    @disruptive_innovator 8 หลายเดือนก่อน

    this is the info I've been seeking to orient myself before making the plunge into some unreal fun.
    top notch job!