Nick Darnell Loading Screen Plugin - GREAT! But I have some questions.

[MENTION=2522]Nick Darnell[/MENTION]

Hi! Just installed the plugin and it is really easy to use, but it was wrote with some “specifications” in mind (kind of map change method, layout, map being loaded), so if you could please just throw some light on some details will be really great.

Info: Installed as “game” plugin, placed the dependencies on my .cs and on "re"generate the solution the code was inserted.

  1. I’m using the SeamlessTravel method to switch between maps that I suspect that doesn’t brodcasts FCoreUObjectDelegates::PreLoadMap( ) triggering the loading screen, I bypassed this by calling it artificially on the same method that request the map change. My trouble was that I can’t get a “instance” from the module access by code to call the non static methods, could you please explain the syntax? With the class declared and defined on .cpp I can’t #include it without get a compiler error.

  2. When going from a gameplay map to another I can get the loading screen by broadcasting the PreLoadMap( ) delegate, but the Main Menu map (that I’m using as Project Game Default Map) doesn’t display the Default loading screen, just the Startup loading screen is displayed at game boot. I can’t find “where” this switching and identification is being made.

  3. Movies are not being played, could you please show how to point movie paths? Does the plugin support .mp4?

  4. Is there a way to change that Trobber by some animated custom UMG? Could you tell how to make this change? I think that change the layout from SSimpleLoadingScreen is “doable” just changing some numbers, but insert a non-slate on it without break the engine is beyound my knowledge.

Thank you by your time in wrote the plugin, made our games “look” like games.

Best Regards.

creasso

You can include an animation of some kind, but you will most likely still need to avoid animating it via anything that references the world timers.
This, unfortunately, means no flip book animations or anything using a set timer node.

This leaves Tick, but it seems without a constantly updating widget of some kind, Tick is not called.
The solution is simple - and somewhat funny ; you add a hidden throbber.
This makes sure Tick is stilled called, which can then use to animate something else.

In then end, I used an overlay containing several image widgets each with a different frame of the ‘animation’ I wanted to show.
I then used RemoveFromParent() & AddChild() to put the frame I want to show on top of the overlay, thus animating it.
Hacky, but it works and stops the textures getting garbage collected.

@Kris

My main trouble is that this engine “layer” is not something usual to me, it’s the subsystem where it starts to register images used on the .ini and do weird things.
“Probably” by declaring the widget variable in the “right” way, it will be pointed on .ini as images set to the loading screen and get a tick( ) to it.
Also I’m not confident about “hack call” PreLoadMap( ) since more things probably are wired to this delegate and could explode, unfortunatelly I can’t access the FLoadingScreenModule type to typecast inside my Game Module (Kris declared it on a private cpp).

I think that just the plugin author could explain how to modify it, bacause this I did this post. I hope that Nick get some time and interest on visit this thread. :slight_smile:

:frowning: Well, I’ll be posting what I get…

Here is the “Hackimplementation” result:

The discoveries:

  1. Looks like the Plugin doesn’t play videos in no way, tried all kind of syntax (“/Game/Movies”, /Game/Movies, /Game/Movies/Fileame)to the path but without any result, to get movies displaying at Startup, needed to change the plugin code to don’t auto-setup a screen on Startup, so the game used the default routine looking on the Project Settings movies to execute.

  2. Updated the plugin code to hook on OnPrepareLoadingScreen() after update to 4.12 as the docs point.
    To this, just changed LoadingScreenModule.cpp from:
    FCoreUObjectDelegates::PreLoadMap.AddRaw(this, &FLoadingScreenModule::HandlePreLoadMap);
    To:
    GetMoviePlayer()->OnPrepareLoadingScreen().AddRaw(this, &FLoadingScreenModule::HandlePreLoadMap);

  3. If the defaultscreen from the Plugin is set with a MinimumLoadingScreenDisplayTime and manualstop to try use/display tips the plugin “stall” after the seamlesstravel being requested, the SSpinningImage stops being ticked and to recover the game rendering, I need to shake the mouse to the game be rendered again.

  4. The minimal functional usage (as shown on video) was achieved turning on auto-complete (what makes tips unusable), also this has a side effect (not related to the plugin probably) that makes the loading screen just “blink” what by log happens when the game enters the transition map. So, I still have loading in progress (the HD led still blinking) but no screen to “cover” this.

  5. I’m studying the MoviePlayer and World SeamlessTravel code, while I didn’t discovered exactly “where” the SeamlessTravel operation should be calling PostLoadMap somewhere and kicking the MoviePlayer before the final destination map being reach.

  6. My method to activate the loading screen is being:

  • Broadcast OnPrepareLoadingScreen() to make the Movieplayer setup the LoadingScreenSettings from the module.
  • Call GetMoviePlayer->PlayMovie()

Am I using it correctly?

Thanks by the attention.

Hello.

Got the right way to point the movies to the plugin.
The “info” shown on the setup mislead users, we don’t need to point “paths”, but instead, the movie “names”. If the movie is on the Content/Movies Path it will be played.

7d34dff286b3e6f345b9521eb71561dbbe9f0286.jpeg

I got this idea watching the SetupLoadingScreenFromIni( ) method.

And here we go…

The setup:

After get noticed that my loading SlateWidget was not being ticked after some seconds of the loading proccess I began to look for a way to “force” tick.

This procedure was described here: link to Dan Hertzka blog entry

Since Nick’s plugin comes with the LoadingScreen complete implementation, just by add the EActiveTimerReturnType Foo(double InCurrentTime, float InDeltaTime) on the SSimpleLoadingScreen code the magic happened.

Unfortunatelly on doing this it stopped to play movies, but, since the change by commenting the lines that setup a “Plugin” loading screen on module startup, the default boot screen and movies from the Engine Settings are shown, the game loop is functional.

To show the tips after the changes above I did setup the plugin this way:

Cheers!

I’m happy you found it useful! :smiley:

I just pushed some changes to make it work better in 4.12, should fix the fact that the screens were not coming up correctly. The movie playing stuff…yeah all that code predates the media framework, I actually didn’t know how to use it - I just exposed it. There’s some outstanding font problems I still need to investigate loading uobjects on other threads is sketchy.

As for the UMG request - not happening. There’s no a world present when the loading screen is open, on top of that it would require potentially running blueprints and allocating uobjects on the special loading screen thread we start up on non-seamless travel load screen transitions.

The OnPrepareLoadingScreen is something I added to 4.12 so I could fix the plugin :slight_smile: The latest version I pushed takes advantage of it now - if you make some improvements feel free to send me some PRs.

Hi Nick,

Thanks for sharing this, it’s clearly useful, easy to setup and hope this will implemented as a standard features in the source code at some point.
For the Startup Movie, I read in multiple places that there are some constraint on video Size & Format & codec so it is well played on “standalone client”, but I can’t find an official statement / Doc on this. I know it’s not something that you “master” but you may be able to catch someone that knows the info or know what specs you use in Paragon / Epic games intro movies / logo movies.

Speaking of improvment, I have 2 things in mind:
1 - Make the Video & Background image not exclusive. I mean as of today on the starting screen if you set a Video (logo) and an image, they are all “played” at the same time. It could be great to add a checkbox to only draw the background image once the video is finished. I think we can use GetMoviePlayer()->IsMovieCurrentlyPlaying() to manage a EVisibility value that is binded to the visibility of the slate brush
2 - It could be also great to handle the Loading Complete - GetMoviePlayer()->IsLoadingFinished() - to display a text “loading complete! click to start” when the AutoCompleteWhenloading is set to false.

Thanks again for the code sharing.

Hi Nick,

I’m using your plug-in in a package game and since then I have this warning in my log:

2016.07.06-20.59.33:592][556]LogStats:Warning: MetaData mismatch. Did you assign a stat to two groups? New //STATGROUP_Threads//SlateLoadingThread///Thread_12a0_0///####STATCAT_Advanced#### old //STATGROUP_Threads//SlateLoadingThread///Thread_ec0_0///####STATCAT_Advanced####

I don’t if someone else already got this, if this is link to this plug-in or the move to 4.12.4. I didn’t find any new “thread in the plug-in code” but that’s maybe in a called function.
Any feedback are welcome.

Thanks,

bad thing this is not working with level streaming :frowning:

Level streaming doesn’t invoke the loading screen system, because it’s not a hard load, it’s completely up to you how you want to occupy the user’s time during streaming.

@Nick

I’ve noticed that during seamlesstravel the loading screen just boot on the first transition (Current Level to Temporary Transition Level) but not on the final loading (Transition Level to Destination Level) is there a way to keep it on screen or “trigger” it again?

Thank you.

I’m trying to get this plugin installed in our game (4.13.3) but keep getting the “compiled with a different version” message.

Anyone have a suggestion on how to remedy this?

[MENTION=2522]Nick Darnell[/MENTION]
Hi Nick ! I have a quick question about your Loading Screen plugin. Is there a chance to make this plugin available also for Blueprint only projects ?

No - I don’t plan to distribute precompiled versions of the plugin.

Thanks for answering. How can I use your plugin without adding c++ code to my blueprint only project?

Anyone have a suggestion on how to remedy this.](http://www.taigamek.mobi)

You can’t, but if you like you can create a blank C++ project, add the plugin to it, compile and copy the binaries over to your Blueprint project. Just make sure you use the same engine version between projects.

You actually can… by running the RunUAT.bat BuildPlugin command. This will take a plugin and add it to the engine and then whenever you create a project the plugin will be there for you. This will work with C++ and BP only projects (once its compiled into the engine). Here’s my batch file.

REM Example RunUAT:
REM Run from an Admin Level CMD prompt in the directory: <engine_location>\Engine\Build\BatchFiles

d:
cd \Program Files\Epic\UE_4.17\Engine\Build\Batchfiles
RunUAT.bat BuildPlugin -Plugin=“D:\Program Files\Epic\UE_Package_Plugins\Source\SmoothZoom\SmoothZoom.uplugin” -TargetPlatforms=Win64 -Package=“D:\Program Files\Epic\UE_Package_Plugins\Dest\SmoothZoom”

After the compile is completed, you take the directory in -Package and copy to your plugin engine directory… I’m working on a Qt5 app that will automate this…

teak

Oh nice! That must be a recent addition. Good to know that one