"Get a Load of this!" How to make a loading screen w/ Alan Noon - July 19th - Live from Epic HQ

Hi Alan,

One of the important thing is to provide the user with “Qualitative” information. Instead of just showing a simple “Loading…” message, can we provide more information like load percentage and the time remaining for the Game/Asset to load completely.

Even though a full blown solution is difficult to be covered in these training streams, can you at least touch on the methods/ways to achieve them.

Just chimin’ in with this one in case you guys haven’t seen it, I added this to the Wiki some time ago :slight_smile:

Please provide example for async/multithreaded (animated) loading screen. And for mobile as well.

I can’t compile it on mac :confused:

Should work fine, we use it on Mobile.

Try making sure you #include “MoviePlayer.h” in the game instance

How do I bypass or modify the Steam VR ‘white room’ to create a custom loading screen for my Vive game? I have tried to access the setskyboxoverride function from OpenVR on 4.11 but it doesn’t seem to be available in 4.11, or at least it isn’t a function in the header file. And if the function just isn’t available, what is the best possible alternative to overriding SteamVR’s loading screen greybox for 4.11?

Thanks. Any guidance much appreciated!

Hey all, thanks for tuning in.

So the issue that came up during the stream with my UMG not firing was that the next room came in so fast, the UMG didn’t get time to show. I should have debugged it live, but whatevs.

I’ve invited Josh Markiewicz to check in on the stream and have look at some of your more technical questions RE: travel and loading screens.

…aaaaand links referenced in the stream:

Nick Darnell’s Loading Screen Plugin

@_TheJamsh tutorial:

Article linked from @PPC_WOLFPACKED : “Fated Team”

Docs on Travel

I’ll be honest in most of my years experience, loading screens aren’t trivial in general. Getting them to animate or play a movie is always critical for console platform cert requirements (basic UX as well), but changing threads so you can do the animation while the main thread loads new content isn’t always straightforward. Managing the render context, etc. Our render guys make that magic happen.

In UE3 we would pre load Bink movies and play them on another thread while work was done. Again left the heavy lifting to a third party.

Point being, getting actual progress bars on top of that can be quite a pain, so many games just stick to “animating spinny thing” to fulfill the requirements. Accurate progress bars require foreknowledge of literally everything you are about to load. At the lowest level, as you read content byte by byte you need to pass that information up to the high level so you can show a percentage loaded.

Once upon a time, at a previous job, during the build disc pass we would scan all the content for each level and generate a manifest with each file and its size as a lookup. Then as we loaded we would relay this information up (seek/tell on CD/DVD was slow). But as games these days aren’t necessarily “load level X” because of memory, open world, streaming, you name it, a prepass may not be possible.

I guess the point is trying to get a loading bar that’s accurate isn’t always worth it.

As for showing a loading screen, I would argue there is also no one size fits all approach to this. Trying to detect “loading now” is probably too late to show the loading screen. And “done loading” is too early to remove it. Inevitably you’re going to have game elements that disappear pre travel/load because you have to clean it up, or elements that stop ticking/pause as loading starts. It just looks wrong. When you get to the other side, maybe you are the first client to connect and you’re waiting for other players. So now BeginMatch hasn’t been called, and you don’t have enough information to spawn a camera in the right location (waiting on some replication). So you’re looking at no character, with a camera pointing at a rock in the ground. Or you need 5 seconds to do a quick AI nav path pass on all actors in the level. Who knows, it’s up to the game. To avoid bad presentation you wait for N other things to occur before you reveal the level.

Every Epic game I’ve worked on manually called ShowLoadingScreen() and manually removed it when ready. Maybe in InitGame() at the destination AGameMode you say SetTimer(CheckForLoadingScreenRemoval, .5) and every half second you look around and determine if its a good time to remove it, then stop the timer. That way its not a wasteful check in your Tick() loop.

I’ll try to stop by later and talk about seamless vs nonseamless (hard) travel. For now though, you always have to do a hard travel to get on the server. It’s a blocking load, just the way LoadMap works. Seamless travel is for transition from lobby to game or map cycle. You have your network connection, tick the engine, replicate actors, and can migrate actors from one level to another if you want.

On mac problem solved. I just add empty c++ class in project (without Loading plugin). After close project and add Loading plugin in “Plugins” folder, open project and plugin’s source start compiling. Installation is semi-automatic, but works )

Last I checked this wasn’t working in 4.12 without packaging, has something changed since this post? https://answers.unrealengine.com/questions/418234/412-p3-loading-screen-on-preloadmap-is-not-fixed.html

I couldn’t get it to work in editor, and I looked through the source and saw it was doing a check and loading a null movieplayer in the editor.
Although, that wasn’t a 4.12 code change so I was a bit confused. I gave up for the time being and stuck with my static loading screen.
But is there a way to get this to work in editor?

Please provide the project files used in video :]

Hey all, I am currently cleaning up and commenting the project for public release. Once we’ve determined the best avenue for distribution, we’ll link it here.


… I know this map :stuck_out_tongue:

It’s dangerous to go alone…

Hi, Alan. I have a bit of a further question. This example was just great! But it works for a compact single level that has lots of sublevels. In my game i have a bigger world and i want to make different scenarios, so what should i do? create different persistent levels that have this kind of setting and then trying to assemble the traveling between persistent levels too? Or is it ‘better’ to have one Persistent level for the full game and have tons and tons of sublevels? That sounds weird to me so that’s definitely why i ask this… I’m not sure how to make what i’m saying consistent with game advancing/progress.
Thanks for your awesome help and tutorials! It’s always a pleasure to have them!

Assets link not work
“%22https’s server DNS address could not be found.”

Sorry about that, the link syntax was missing a single character :stuck_out_tongue: It’s fixed now, let me know if that doesn’t work for you still.

There is only one persistent level and you use it when you stream levels. Correct me if I’m wrong but I think that when you say different “persistent” levels you mean normal individual levels without level streaming and the other “persistent” level is the actual persistent level with sub-scenarios.

If this is the case the answer is it depends, it’s something to test yourself to determine what works better, IMO unless you need something with “seamless” travel, regular independent levels are fine.

I’ve been able to achieve proper loading progress bars in a Streaming Levels approach similar to the one in the video - the functionality isn’t exposed to BP by default so I had to create a custom BP Library (download available here if anyone is interested). You can read the current progress for any streaming level in flight by providing its package name.

So far I haven’t found any solution to use Streaming Level Loading Screens during a hard load in Multiplayer. It’s feasible for server travel situations (e.g. Lobby->Start Match) but not at all for joining an existing game world already in progress.