Training Stream - UE4 Game Framework Basics in Blueprint - Nov 10th, 2015

[=;417686]
Question:

When calling “OpenLevel” in standalone (not in PIE) the engine seems to recompile all blueprints I have, and that takes ~20 seconds for me, so the game is freezing while that happens. Is there any way to avoid that?
[/]

Hmmm… I haven’t seen that myself. This particular project is pretty light though, so it might be happening and I’m just not noticing it. I’ll ask around, but I doubt that should be happenning. You sure it’s the BPs recompiling?

Thanks for the stream Alan.

Question, if you pick up two coins in a level and then save and quit, when you reload there will be five coins again. How would you go about removing the two coins you previously picked up?

Thanks.

[=MajorFailure;417704]
Thanks for the stream Alan.

Question, if you pick up two coins in a level and then save and quit, when you reload there will be five coins again. How would you go about removing the two coins you previously picked up?

Thanks.
[/]

Good question!

Off of the top of my head:

Each time a coin is picked up, I would add a reference to it in an array.
On Save/Quit, I’d write that out to the save game.
On Load, I would I’d get the picked up coins from the array, load the level, and then destroy them.

I’ll have to give that a try…

[=AlanNoon;417701]
Hmmm… I haven’t seen that myself. This particular project is pretty light though, so it might be happening and I’m just not noticing it. I’ll ask around, but I doubt that should be happenning. You sure it’s the BPs recompiling?
[/]

Yeah I am sure. I just tested it again and the log is like this:



[2015.11.10-20.53.05:320][348]LogBlueprintUserMessages: [UI_C_0] Play Game Clicked
[2015.11.10-20.53.05:497][348]LogPackageName: SearchForPackageOnDisk took   0.172s to resolve LoadingScreen.umap.
[2015.11.10-20.53.05:679][348]LogPackageName: SearchForPackageOnDisk took   0.182s to resolve LoadingScreen.umap.
[2015.11.10-20.53.05:679][348]LogNet: Browse: /Game/Assets/Maps/LoadingScreen
[2015.11.10-20.53.05:680][348]LogLoad: LoadMap: /Game/Assets/Maps/LoadingScreen
[2015.11.10-20.53.05:699][348]LogParticles: Destroying 0 GPU particle simulations for FXSystem 0x000000001F4D1E40
[2015.11.10-20.53.06:330][348]LogAssetRegistry: FAssetRegistry took 0.0004 seconds to start up
[2015.11.10-20.53.06:648][348]LogBlueprint:Warning: [compiler Tree] Warning  Clear Timer by Function Name  is deprecated; Use Clear Timer by Handle
[2015.11.10-20.53.06:648][348]LogBlueprint:Warning: [compiler Tree] Warning  Clear Timer by Function Name  is deprecated; Use Clear Timer by Handle
[2015.11.10-20.53.06:654][348]LogBlueprint:Warning: [compiler Tree] Warning  Clear Timer by Function Name  is deprecated; Use Clear Timer by Handle
[2015.11.10-20.53.06:659][348]LogBlueprint:Warning: [compiler Tree] Warning  Get Random Point in Radius  is deprecated; please replace or remove it.
[2015.11.10-20.53.06:675][348]LogBlueprint:Warning: [compiler Tree] Warning [0014.06] Compile of Tree successful, but with 4 Warning(s) [in 39 ms]
[2015.11.10-20.53.06:675][348]LogBlueprint:Warning: [compiler Tree] Warning [0014.06] Compile of Tree successful, but with 5 Warning(s) [in 0 ms]
[2015.11.10-20.53.06:675][348]LogBlueprint:Warning: [compiler Tree] Warning [0014.06] Compile of Tree successful, but with 6 Warning(s) [in 0 ms]
[2015.11.10-20.53.14:148][348]LogBlueprint:Warning: [compiler MyCharacter] Warning 'self' is already a 'MyCharacter', you don't need  Cast To MyCharacter .
[2015.11.10-20.53.14:148][348]LogBlueprint:Warning: [compiler MyCharacter] Warning 'self' is already a 'MyCharacter', you don't need  Cast To MyCharacter .
[2015.11.10-20.53.19:384][348]LogBlueprint:Warning: [compiler UI] Warning  Clear Timer by Function Name  is deprecated; Use Clear Timer by Handle
[2015.11.10-20.53.23:483][348]LogBlueprint:Warning: [compiler MyAIController] Warning  Clear Timer by Function Name  is deprecated; Use Clear Timer by Handle
[2015.11.10-20.53.27:529][348]LogBlueprint:Warning: [compiler MyManager] Warning  Blendables  - the native property is not tagged as BlueprintReadWrite, the pin will be removed in a future release.
[2015.11.10-20.53.33:701][348]LogBlueprint:Warning: [compiler Tower] Warning 'Character' is already a 'MyCharacter', you don't need  CharacterMoveTo .
[2015.11.10-20.53.40:366][348]LogAIModule: Creating AISystem for world LoadingScreen
[2015.11.10-20.53.40:367][348]LogWorld: Game class is 'GameMode_Play_C'
[2015.11.10-20.53.40:371][348]LogWorld: Bringing World /Game/Assets/Maps/LoadingScreen.LoadingScreen up for play (tick rate 0) at 2015.11.10-21.53.40
[2015.11.10-20.53.40:372][348]LogWorld: Bringing up level for play took: 0.001581

I have removed many lines, but you see it’s going through all of my blueprints. If there would not be any warnings I would not notice it, but since I was a bit lazy and have not yet removed some deprecated functions and I have some unnecessary casts, I see the warnings so I know the engine is compiling blueprints. You see that at time 20:53:05 I hit the play button and on time 20:53:40 the level is loaded. Between that, the game is freezed for 35 seconds. The level is just an empty level with a loading screen and after it’s loaded it starts loading the real levels with the LoadStreamLevel node.

[=AlanNoon;417737]
Good question!

Off of the top of my head:

Each time a coin is picked up, I would add a reference to it in an array.
On Save/Quit, I’d write that out to the save game.
On Load, I would I’d get the picked up coins from the array, load the level, and then destroy them.

I’ll have to give that a try…
[/]

Thanks! Can you let us know if that works please? I guess an alternative would be to save the names of the pickups that have been collected?

BTW will you be continuing this subject on another stream?

Cheers.

[=MajorFailure;417759]
Thanks! Can you let us know if that works please? I guess an alternative would be to save the names of the pickups that have been collected?

BTW will you be continuing this subject on another stream?

Cheers.
[/]

Yeah, that’s basically the idea I was going for. My first stab at it didn’t pan out, so I’ll have another go at it later.

Did not have any plans to continue with this one, but if there are specific topics you would like covered in the future, call them out in this thread.

[=AlanNoon;417766]
Yeah, that’s basically the idea I was going for. My first stab at it didn’t pan out, so I’ll have another go at it later.

Did not have any plans to continue with this one, but if there are specific topics you would like covered in the future, call them out in this thread.
[/]

Ok thanks Alan … and will do :slight_smile:

Cheers.

[=BPANDREW;414892]
[question] I’ve seen people house and initiate their UMG widgets from many different places - where is the best place? I currently use my player controller
[/]

I evolved my scripting from Unreal 3, so I typically do anything HUD related from the player controller. I think this just stems from a multiplayer line of thought as each HUD instance is specific to each player. But I just stick with it.

[=CharlieTheTall;417929]
each HUD instance is specific to each player.
[/]

This.

YMMV however. Do whatever makes sense for you game/workflow.

Can’t find the recorded version on Youtube yet. When will be uploaded? Thx

[=gepetto;418119]
Can’t find the recorded version on Youtube yet. When will be uploaded? Thx
[/]

It doesn’t happen immediately, but you can watch it on previous videos on twitch.

/v/25076937

I’m viewing the saved video of that stream on twitch but there is no sound! Is it normal?

[=PopoQc;418188]
I’m viewing the saved video of that stream on twitch but there is no sound! Is it normal?
[/]

No. Try a different browser.

Palemoon (Firefox fork) works for me.

Archive is up!

[=richardboegli;418193]
No. Try a different browser.

Palemoon (Firefox fork) works for me.
[/]

Yes I restarted Firefox and everything is fine now. As always it is the Flash player fault. :wink: That stuff is always crashing … lol

[=AlanNoon;417701]
Hmmm… I haven’t seen that myself. This particular project is pretty light though, so it might be happening and I’m just not noticing it. I’ll ask around, but I doubt that should be happenning. You sure it’s the BPs recompiling?
[/]

What answer do you get from “asking around”? :stuck_out_tongue:

If it should not happen that means I should create a bug report on the answerhub?

[=;418632]
What answer do you get from “asking around”? :stuck_out_tongue:

If it should not happen that means I should create a bug report on the answerhub?
[/]

Was out of the office yesterday. Waiting to hear back

Response:

[]
We can’t know whether it has any dependencies that might have changed so we always compile on load.
If it is cooked content the compile on load will not occur
[/]

As I mentioned: I suppose the projects I do are so focused on some specific aspect, they do not take a large amount of time to recompile, so I never noticed.

Sounds like this is expected behavior.

Is the updated version of the project build from tuesdays tut available yet?

[=WilliamHooper;419204]
Is the updated version of the project build from tuesdays tut available yet?
[/]

I hadn’t planned on updating it, actually. They should be relatively the same, with only minor differences. Is there some aspect you feel is lacking in either/or?