Announcement

Collapse
No announcement yet.

Seamless, Proper Loading Screens! [Play Movies, Audio & Animated Widgets!]

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [TUTORIAL] Seamless, Proper Loading Screens! [Play Movies, Audio & Animated Widgets!]

    After being somewhat frustrated with the loading screen solutions I've seen people follow so far, I've decided to share how I handle Loading Screens in my Hovertank Game.

    IMO I think this is personally the best (and most sensible) way to go about it. Current examples require all sorts of workarounds to implement such as loading into different levels, using streaming for the entire project etc - completely defeating the purpose of a loading screen in the first place. Less than 20 lines of code lets you avoid all of this.
    • No temporary maps or streaming level nonsense!
    • No additional calls, nodes or setup required, engine code automatically handles all transitions and kicks in when a map is triggered to load. All you have to do is call Open Level, or Join Session etc...
    • No conflicts in PIE.
    • Can easily play Movie Files, Audio Files & Animated widgets
    • No Garbage Collection / reference issues.
    • MoviePlayer is supported on all major platforms
    • Integrates seamlessly with an existing project.


    There's a very minimal amount of C++ to set this up (very minimal), and I've pasted full source that you can easily copy-paste into an existing project.
    https://wiki.unrealengine.com/Loading_Screen
    Last edited by TheJamsh; 12-30-2015, 09:31 PM.

    #2
    Thanks for sharing this! (:
    Open for contracted work | C++/BP (incl. Multiplayer) | Tutoring | VR

    My UE4 Blog/Page with Tutorials and more: Hit me for ALL the things!
    (Including 100+ Pages Multiplayer Network Compendium to get you started.)

    Comment


      #3
      Woo! It's a Christmas miracle! Thanks for this
      Twitter: @zerofiftyone_
      Website: zerofiftyone.net - My game development blog
      Button Frenzy store page: http://store.steampowered.com/app/454630

      Comment


        #4
        Thank you very much.

        Comment


          #5
          ok bookmarked for future referance

          quick question though, see-ing as my project uses other(plug-in/steam) for the gameinstance how would i add that together with your fix
          UT40K:The Chosen - Warhammer 40,000 for UE4
          ut40kgeodav - UE4 Tutorials

          Comment


            #6
            Bookmarked as well. Such a mechanic should be built in the engine.
            Github - YouTube - Unreal Slackers - KITATUS

            Comment


              #7
              Originally posted by Geodav View Post
              ok bookmarked for future referance

              quick question though, see-ing as my project uses other(plug-in/steam) for the gameinstance how would i add that together with your fix
              The code in my Game Instance is absolutely minimal, you should be able to copy it into your custom game instance and everything will work as before

              Comment


                #8
                Nice share TheJamsh, I actually have a Blueprint equivalent -- I had to do this for something I released last year requiring multiple levels / loading screens.

                Its not as straight forward for obvious reasons, but achieves similar results.

                https://answers.unrealengine.com/que...vel-loads.html

                Hi Jamiex304,

                Depending if your menu level is interactive. Such as if it has actors which are used as menu props. Then you want to be able to unload that level, and load another. Well! To do this is not entirely crazy.

                You do this with Level Streaming. The way level streaming works is by having one persistent level, and other levels which you stream in at even given moment. So this persistent level will be the the "Transition" level. All it is responsible for is loading, and unloading levels.

                There is a tutorial on level streaming here.

                https://wiki.unrealengine.com/Bluepr...evel_Streaming

                So what you essentially do is on loading the persistent Transition level first. Then the persistent level is your constant state. Actors in this level will always be active, allowing your full control while other levels are interchanged. Next, you load your menu level. Then the player does whatever, and tells the menu it wants to load Deathmatch. Menu level now communicates to transition level, open Deathmatch. Now put up some video animations, and keep the main menu up. Keep in mind -- while Deathmatch is streamed into the Transition level. Everything on the menu is still going. You can hide it or update it after Deathmatch is finished. Then jump in Deathmatch, unload the Menu. Done!

                Doing it that way, you never once pause the state of the game preventing any unwanted waiting or unresponsiveness.

                Best,

                Peter
                Last edited by PeterLNewton; 12-29-2015, 08:55 PM.

                Comment


                  #9
                  Thanks for sharing with the community!
                  2B || (!2B)

                  Comment


                    #10
                    thanks share

                    Comment


                      #11
                      Have updated the OP to contain a bit more information

                      Comment


                        #12
                        Thank you, this is incredibly helpful!
                        Particle Editor Extension: Marketplace Page | Documentation
                        Code plugin which extends your particle effect toolbox with new possibilities.


                        SVG Importer Plugin: Marketplace Page | Gumroad Page
                        Import SVG (scalable vector graphics) files as rasterized rendering or as multi-channel signed distance field.

                        Comment


                          #13
                          Thanks for the sharing.

                          What happen in case of SeamLess Travel? Is it drawing your loading screen?

                          Comment


                            #14
                            Thank you!!

                            Comment


                              #15
                              Great tutorial man, thanks for sharing

                              Comment

                              Working...
                              X