Download

Animated loading screen and UMG.

Hello everyone,

For the last few days i am trying to figure out a way to play an animated loading screen between (paper2d project) levels.
After reading everything i could find in the forums i suddenly realized that something so basic (since all games have loading screens) is missing from your software as an out of the box feature!Even the great Rama was having trouble with this.

UMG is a great opportunity for you guys to fix this since it takes less than 5 minutes to import a video ,create a media texture and then play the moving image through a widget while the game is loading.When the next level is loaded you just remove it from viewport and ,thats it! Unfortunately at the moment it seems that it has no parallel loading capabilities so it hangs or crashes.Do you plan to add this feature in the future?

I understand that most of you at Epic are great programmers and it is easy for you to do something custom and make it work but the second you gave us the privilege to use your engine and non programmers can create a game (God bless blueprints!) then you must resolve some basic things like the above so we do not waste man hours in trying to understand how to trick the engine so we can make an animated loading screen to work.You create something that works for 90% of people,post a tutorial and if someone wants to make something out of the norm,then he can do it by himself since he has the skill,budget and manpower to do it.

This is just my opinion and how i see things when something so specialized (Unreal) that was created from you ,for you goes public and thousands of people start using it.It really blows my mind when i see some very simple and basic things missing that even shareware programs have but on the same time we can do Materialraycastigtressfxgazillionpolysmorphingwhiletheyemittparticles with a press of a button! :slight_smile:

If for any reason there is an easy way to play a video while my level is loading and a fellow Unreal user or staff knows something about it i would really like to hear about it.

Thank you!

Because map loading runs on the main thread, it blocks any other game activity until it’s completed. It’s a pain, but that’s the way it works right now.

I believe Epic has stated it’s working on a parallel async loading solution but I have no citation for that. In the meantime though, you can use level streaming (which is asynchronous) to load the new level whilst unloading the other level and play your loading screen animations. Ask every fractional second is level is loaded and when that returns true, remove the Widget from Parent.

It can work, but you’ll either have to wait for something that may or may not come, or you’ll have to rework your game for level streaming instead of level loading.

Yeah unfortunately the closest thing right now (as far as I know anyway) is to play a media texture right before the level load command, then play the media for a couple of extra seconds on begin play… but when the level is actually loading it will freeze to the last frame since it’s thread locked… and you certainly cannot have a nice loading progress bar or anything along those lines, which is sad.

But you can do what you want with level streaming.
Keep a top level that contains the loading animation.
To load a new level, start the animation, unload the current level, load the new level.
When new level is done loading, remove animation.

I just did some testing… It actually works surprisingly well :eek:, are there any downsides/limitations when loading a level with streaming?

I always use streaming not had any issues yet, did very similar things with Unity too

One downside I am aware of, and have ran into, is you can’t use level streaming when transitioning from one World Composition based world to another. Since they are unique UWorld’s. So at the moment I have no animated load screens, as I can’t find a way to async load a World composition based world and only transition to it when it has finished loading.

Thank you guys for all your feedback.

I am creating a 2d side scrolling platformer (Mario,rayman etc) and it makes no sense to me to use level streaming. Call me old school but I just cannot see what benefits it has to offer in my type of game.

Yesterday, before I created this post I experimented with level streaming and it was a mess. My already created levels blended inside one another and for the love of me I could not understand how the player start worked since the second I pressed play he would spawn somewhere (outside the player start )I could not pinpoint and he would fall endlessly to his doom. I do not know if this is a paper2d specific limitation or my incompetence but I think I am not asking for too much. Just let me load one level after another without the current limitations. As I said earlier now that the engine is more diverse and lets us 2d guys work with it they must adjust accordingly the engine to suit a bigger audience and not be tailor made for only big projects like open world games and such.

Level streaming can absolutely work with a 2D game. Don’t think of making your worlds seamless; unload the previous level while you load the new level and once the new level is loaded you can set your player position directly. Don’t worry so much about the Player Start, just set actor location when you need to, even if that means at the beginning of the game.

Though I agree, async load is a needed feature.

According to this card on the roadmap Trello (Trello) it is currently underway. I’d caution those unfamiliar with the roadmap that the months noted does not mean that it will be done in January, just that there is planned work for it through at least January. In practice, though, I’ve found streaming levels with an always resident UI map to be a good solution for all of the cases I’ve run into. This will clearly be needed for large world support, however, so I expect it is a high priority for Epic right now

Any progress with this? Is there a chance to see this working on 4.8? I would love to see my game having animated loading screens :slight_smile:

+1 must have

Thank you for the support zip!

Since 100% of all games have some sort of a loading screen i would like ask from the lovely developers at Epic to seriously consider this as a top priority. It only makes sense that if we can create a full game using BP only (the non coders) why would we have to use c++ for something so basic and essential to all games out there regardless genre ?

It is like giving me a dual clutch (blueprints) Ferrari (Unreal) without a steering wheel! :stuck_out_tongue:

Level streaming is the only way to do this currently with UMG. If you don’t use level streaming, then we would need a way to run arbitrary blueprint logic while loading another level without streaming it which is currently not safe to do. Since UMG is nothing without the ability to run arbitrary blueprint logic, you end up getting lots of asserts and crashes when you attempt to tick a Widget during load. It’s the same reason C++ is required to use the current loading screen system, it’s the only safe place to do it from.

We could expose the stock loading screen system in some form, but it would not be able to run any blueprint script. So, given that constraint, what sorts of expectations would you have for it?

Go and play Rayman Origins / Whatever the other one is called quickly and tell me you can’t achieve the same loading effect with level streaming :wink:

I pretty much am using a static image and a good old fashioned progress indicator gif loaded from a website using a WebUI Plugin to do my load screens … works well enough for me.

Hell … I am even currently working on a startup screen using the same type of effect … WebUI - Slide Show on the website … rinse and repeat until the level is loaded.

Hey! I just wanted you to know that when I first started using unreal back in the summer I bought your book! So I feel that I know you without actually knowing you :slight_smile:

After re-reading my previous post and your answer I feel that you are correct and I need to clarify the part “it makes no sense” . What I actually wanted to say is that when I first started using unreal and coming from a traditional 2d engine I had no clue about her limitations and how things work. My assumption was that I am using the best engine in the world so an animating loading screen should be something that is as basic as opening the editor.

When I started researching the whole loading screen subject I was too far away with my game logic and setup to start over since we are only 2 people and we lack the man power and time to start everything from scratch. Menus,checkpoints, saving,levels how collectable work etc etc. Maybe it is something that can be done in a few days or weeks but my whole point in starting this thread is to inform the developers that if they give us this option it would help all of us indies to save countless hours of researching and trying to figure out how to make something so “basic” work.

Nick thank you for using your precious time to answer to this thread!
I will try to answer your question as an apple consumer would .
The only expectations that I have is to drag something that animates and to be able to see it animating while my level is loading! :stuck_out_tongue:

I know that my answer ignores completely all the awesome technical information that you gave me above but I really do not care how you are going to do it. That’s why you are a rock star and I have your poster on my bed wall! Because you can overcome every obstacle and make wishes come true!

In all seriousness now I wish that you can do something about it since I see a lot of people having the same problem as I have all over the answerhub. If you can pull this through you will help a lot of indies and individuals out there.And that is a good thing :slight_smile:

Thank-you for the lovely compliments :stuck_out_tongue:

In regards to what you said, Are you saying you want something in the level that will animate while the level is loading? As in a character running in the middle or what? What you could do is something I recently did in my project: Use a Paper2D sprite.

I know at first you must be thinking: What the heck do you mean? - But I mean it literally. Just bring one in on and slap it into your level. Create a sub-level and slap the Paper2D animation (Of a person running or whatever), put a camera looking at it and make a black background or whatever.

Then while the sub-level is loading, you can have it snap to your loading level and then snap back when it’s done.

Better yet? Have your Paper2D animation on it’s seperate level, then when you go to change to a different sub-level, get where the player camera is looking at and pop your animation on top of there - To get the real Rayman effect!

But I don’t know what you exactly need. I tell you what, If you let me know exactly what you need, I’ll whip up a quick tutorial (In the style of one of my books) so hopefully I can help you out! :slight_smile:

First of all i would like to thank you for taking your time to try and help me.

Unfortunately i don’t think that i quite follow you :o

Let me try and explain a little bit more what i want to achieve and how i tried to achieve it until now.

My game setup is quite classic. One level is the “main menu” another one is “world 1 level 1” and so forth. If i am for example in my main menu and press “New Game” a node fires up that says “load world 1 level 1” . Pretty simple. The problem is that the second the load command fires up everything freezes.I assume (now i know) that there is no asynchronous loading in Unreal. No matter if you have 8 cores like i do, Unreal spares none :stuck_out_tongue:

My hacky approach to avoid using UMG like i did with my menus (sorry Nick but up until October UMG was crashing like crazy and i still think that you do not support flipbooks) was to create a BP that had inside it a 1920x1080 black texture (this is the maximum resolution that i am aiming for) to black out the screen (another hacky approach here since this still does not work if i am not mistaken Why matinee fade track does not work on a Paper2d project? - UE4 AnswerHub) and on top of that i had a super cool flipbook with all the stuff i wanted to animate.

The plan was to spawn it above everything else (while i disabled my HUD for obvious reasons) when my player touched a level complete BP with a collision trigger.

So: Is trigger overlapping? Disable HUD,Spawn Loading BP , and when the next level loads, Destroy Loading BP (with a nice fade out) ,Enable HUD and we are good to go!!

Unfortunately it did not go as planned! Grrrrrr.

Plan B: I discovered how easy it is to create a media texture, strap it inside a UMG and 2 minutes later it can fill up your screen with a glorious animating foreground! Whoooo hoooo! I can call it before my load command and destroy it on Event begin play in the other level!

Unfortunately it did not go as planned x2 ! Grrrrrr.

With all the above information on how my game is setup (with no sublevels) does your solution work?

@Nick i need to stop reading and posting stuff at 1 a.m after 10 hours of work! No it wouldn’t really help me if i had no control over it. Unless there is a way to do all the above somehow.
To all the lovely Unreal developers out there. What i am describing above sounds to you irrational ? Isn’t this the way a newcomer would except from the engine to work? I hope that we will see a fix for this soon ,if not i will kindly ask (maybe beg :slight_smile: ) from a c++ community guru to help me out on this.

+1. Doing a loading screen via level streaming can kinda work for a single player game but it feels hacky and I can’t see how it is possible to do this using streaming levels when the loading time is while the player connects to a server (all levels will reset to the server map immediately after the connection, won’t they?). I’ve also tried MoviePlayer which is almost exactly what I need but it seems to disappear immediately after level load, regardless of the bAutoCompleteWhenLoadingCompletes setting, while I would like the loading screen to stay until I destroy it.