How to ACTUALLY Load Levels in Unreal and Make Loading Screens

  Рет қаралды 25,809

The Game Dev Cave

The Game Dev Cave

Күн бұрын

Loading levels is one of the most basic requirements for almost any game. And while Uneal engine provides you with some options, I see most people just using the simple " Open level" node, which is not that great. so today, let's talk about the proper way to do this!
Get the project on Patreon : / 94995004
or as a youtube Member : • Post
Join this channel to get access to perks:
/ @thegamedevcave
Join the discord for any help you need! : / discord
support the channel and development over on patreon : / thegamingcaves

Пікірлер: 67
@TheEarlsRenegade
@TheEarlsRenegade 4 ай бұрын
BTW if you don't want to use level streaming you can also: 1) async load Asset (using the level reference) 2) Display loading screen 3) When loading is completed use open level node This removes most of the screen freeze incurred during the loading process.
@thegamedevcave
@thegamedevcave 4 ай бұрын
that also works out great! I like using level streaming because it allows me to keep my player object around without having to reload all kinda of stuff like HP/ weapon loadout/ level/XP/ etc. But if Level streaming isn't an option for whatever reason (there could be loads of reasons i'm sure!) this seems like a good alternative!
@FTChristmas
@FTChristmas 3 ай бұрын
Most helpful comment ever - thank you! 👍
@TheEarlsRenegade
@TheEarlsRenegade 3 ай бұрын
@@FTChristmas no prob 🙂
@dudiheadz
@dudiheadz 2 ай бұрын
I'm making a multiplayer game, and the level streaming part of it was making my head hurt - this helps so much! EDIT: For the open level node, would you say to open it by name or by reference?
@zork0w
@zork0w 2 ай бұрын
@@dudiheadzI think that by reference is still better and u will get an entire control on it (with variables, etc..)
@BenLeskoGD
@BenLeskoGD 3 ай бұрын
I was looking for this, thank you!
@noahbrewer2476
@noahbrewer2476 Ай бұрын
Honestly this'll help me a ton with a massive project I'm working on. Thank you for supplying your knowledge :)
@Eroktic
@Eroktic 4 ай бұрын
Why I haven't seen this video earlier. Thanks!
@dmangamesSTUDIO
@dmangamesSTUDIO Ай бұрын
Great tutorial! Thanks for making this
@VinoVenitas
@VinoVenitas Ай бұрын
This was useful thank you. I love the fact that I finally have a solid way to actually include loading screens into my game. Because I have a feeling I am going to need them. So this was great. Thank you. I will probably replace the casting with an interface because casting isn't the preferred method but still a good tut so thank you.
@thegamedevcave
@thegamedevcave Ай бұрын
yeah casting to check for the player character isn't great xd you can just "get player character" and use an == node instead, prevents having to do a dynamic cast. Interface is even better. But in reality, casting to the player class actually doesn't matter that much, not casting is about preventing unneeded classes to be loaded into memory but your player'[s class will always be loaded anyway, so you're not actually saving all that much by avoiding the cast
@sum_rains7899
@sum_rains7899 3 ай бұрын
Great Video, Thank you. Joined the discord
@joel-BB
@joel-BB 4 ай бұрын
This is great please make more videos like this!
@eddielonestar7962
@eddielonestar7962 Ай бұрын
Hey there. Great tutorial. For some reason I'm unable to select LEVELS under the WINDOW tab. It's not there. I've reset the editor view back to default also. Where has it gone or what do I need to do to enable it again please?
@MsomeleShow
@MsomeleShow 3 ай бұрын
As you mentioned on 5:10, how would you enable visiblility of a speceific loaded level via blueprint? I've been struggeling with that a week now can't find the way.
@thegamedevcave
@thegamedevcave 3 ай бұрын
i've never really found a context where this is actually relevant but i am pretty sure you just load again, but this time with that box ticked, since it's already loaded, it will effectively just turn it visible without having to load
@Djackz
@Djackz 4 ай бұрын
Thanks for the video! How do you rotate the capsule my guy is facing a wall? Rotating it normally doesn't work
@thegamedevcave
@thegamedevcave 4 ай бұрын
you can do it in whatever way works best for you, the way I do it is I have a component that I copy the world rocation and location from onto my character (good to make it an arrow component or something so you can see the rotation)
@ryanjdevlin87
@ryanjdevlin87 4 ай бұрын
bro this was pure gold omfg thank you so much this + ur level streaming tutorial answer'd so many questions of mine ! Im finally understanding how the hell I'm gonna load all these 4K assest's I have without the players PC melting lol ! Thank you so much !
@thegamedevcave
@thegamedevcave 4 ай бұрын
Glad I could help!
@nobodyimportant4778
@nobodyimportant4778 Ай бұрын
So you can also use this for culling?
@projectgg6730
@projectgg6730 2 ай бұрын
So what about multiplayer? Rn I have it so from the main menu if you click on LAN multiplayer (this game is lan only rn) It will open level by name with ?listen. From there someone can host and someone can join. Once the other players join (up to 3) The host can start the game. Im doing it rn with a seamless travel and I have a transition map and everything. However this seems so much easier to move a session to a new level. Thoughts?
@thegamedevcave
@thegamedevcave 2 ай бұрын
not entirely sure on multiplayer, for that I think your original method might work better still, but it's worth trying if loading asynch on the server like this works. I imagine that it would.
@musicc267
@musicc267 2 ай бұрын
How did you create a World type variable? It doesn't show on my variables type list.
@ghostgamer260
@ghostgamer260 2 ай бұрын
If you make a variable from that cyan dot by right clicking it’ll make one for you.
@yorisongs9804
@yorisongs9804 2 ай бұрын
When using Load Stream Level (by object reference) to switch sublevels, is it possible to arbitrarily switch game modes, as setting a new GameMode on the NextLevel side does not seem to override it properly.
@thegamedevcave
@thegamedevcave 2 ай бұрын
sure thing! just gotta set up an event dispatcher in the widget that calls out whenever the button is hit and assign the load function to that event dispatcher
@skal3802
@skal3802 4 ай бұрын
The best UE guides on whole KZbin
@thegamedevcave
@thegamedevcave 4 ай бұрын
Thanks! happy to help!
@LeateqOfficial
@LeateqOfficial 4 ай бұрын
Amazing tutorial, thanks for this ! What to do if i want to make a game when you have a hub, and when you enter a door it randomly teleports you to one of 20 levels How do you make it work ?
@odinzai4769
@odinzai4769 3 ай бұрын
I was wondering the same thing!
@SEANandSYD
@SEANandSYD 2 ай бұрын
A multigate that splits into all 20, and the box marked random is checked
@nickbakalos91
@nickbakalos91 19 күн бұрын
Does this work for waiting for nav mesh to finish generating? I am curious how to fire off an event to know when the navmesh is done generating to close the loading screen.
@thegamedevcave
@thegamedevcave 19 күн бұрын
I think navmeshes usually dont get generated on runtime so I dont think that's something you have to worry about. navmeshes can update on runtime still, but the base navmesh should be generated beforehand and will simply get loaded in like any other asset in the level. So these events would only run after it's been loaded in I believe :)
@abdoulraoufgambo
@abdoulraoufgambo 14 күн бұрын
Hello ! i hope you're doing well ! I have a very big landscape. can this logic work with it ?
@thegamedevcave
@thegamedevcave 13 күн бұрын
if you're wokring with a big landscape you should probably more so look into world partition
@nuttyak2taps
@nuttyak2taps 3 ай бұрын
For my game I'm thinking of using a seamless level loading system similar to Half Life, but without any loading stutters. Do you reckon this would be viable, or should I just accept the loading screen?
@thegamedevcave
@thegamedevcave 3 ай бұрын
for the most part, unreal very much is built to support games without loading screens. this method is kind of a roundabout way to emulate classic games with loading screens. what you are probably looking for is Level streaming volumes. with that, as long as the players is isnide a certain box, it will load in a streaming level (which holds all the assets of that area) and then when you leave it again, it all get's unloaded. Loading and unloading level streams is done on a separate thread , so the game won't stutter when you do it but you do need to make sure that the game has enough time to load in the streaming level (which is why a lot of modern games have things like climbing or crawling sections, those are pretty much just replacements for loading screens)
@nuttyak2taps
@nuttyak2taps 3 ай бұрын
@@thegamedevcave Interesting, I recall seeing the level streaming volume and was hoping it'd be used for that purpose. Thanks for the reply!
@TheDjscrady
@TheDjscrady Ай бұрын
just a question: if i use water system of ue5, can i do the same level streaming?
@thegamedevcave
@thegamedevcave Ай бұрын
I don’t think that really will impact eachother to be honest. Aside of course from the fact that water won’t interact with objects until they are loaded in
@EmarStudios
@EmarStudios 11 күн бұрын
i don't seem to be able to get the "set actor location" thing to work right
@user-fm9zo5le2v
@user-fm9zo5le2v 3 ай бұрын
But is there any downside in using level streaming? Like, for example, will lighting spill into the other level on baking?
@thegamedevcave
@thegamedevcave 3 ай бұрын
it shouldn't. you can bake the lights in each individual level if you prefer even (every streaming level can be opened on it's own, isolated from evyerthing else as a level) but even if you do bake everything from the persistant level with everything it in, you should't have any overlapping light. you may want to test it to be sure for your usecase though but generally I dont imagine you'd have lights that are big enough to reach from 1 level into the next if you place them a little distance apart, and on top of all that, i assume your levels will have walls that prevent all that to begin with :) No single sollution is perfect though, there's up and down sides to everything but I'm fairly sure that the light situation should be fine.
@user-fm9zo5le2v
@user-fm9zo5le2v 3 ай бұрын
@@thegamedevcave Thanks. For my case, my levels will be completely different from each other, different skybox, directional light etc. I wonder if, in that case, there will be any problems. The reason I'm using level streaming is because open level doesn't allow for data persistance very well, if at all.
@thegamedevcave
@thegamedevcave 3 ай бұрын
You should be able to include those directional lights and sky boxes inside the streaming levels but those indeed may cause some light baking issues i can imagine so in that case i would probably just try it out in a test project first to make sure. Possibly baking the levels 1 at a time instead of baking in the persistant level is still an option. Nit ideal though. Might also be easier to simply not bake those lights if you can get away with it xd
@aleca8910
@aleca8910 3 ай бұрын
Lights should be always in your persistent level.
@roydash5657
@roydash5657 4 ай бұрын
I have one question I can load Map?
@jlebrech
@jlebrech 3 ай бұрын
you could begin the loading BEFORE you touch the door, and open the level if it's finished loading when you touch the door. and it's still loading then you still have the loading message.
@thegamedevcave
@thegamedevcave 3 ай бұрын
exact implementations depends heavily on your game but you could of course do that! espcially if your levels are small, it would allow you to not have any need for a loading screen in most cases. (then again, if your levels are small, it's probably not an issue either way). Worth keeping in mind that if your streaming levels are very large, having multiple of them loaded at the same time, while it may prevent loading times from getting long, it will also require a good bit more memory. so as always, it's a balancing act which heavily depends on the actual game, it's size, how it's structured and so on :)
@jlebrech
@jlebrech 3 ай бұрын
@@thegamedevcave a lot of games have a loading screen corridor.
@thegamedevcave
@thegamedevcave 3 ай бұрын
@@jlebrech that’s a whole separate option, I think it’s an overused and annoying technique personally, I would much rather just have a loading screen instead of mindlessly having to press forward for something that is effectively still a loading screen but now requires me to be there. Of course you can make that more engaging by loading some simple extra things into a corridor like that. Most games do not do that sadly
@wilismatrix9847
@wilismatrix9847 4 ай бұрын
lol the best easiest tutorial so far for async loading !!
@thegamedevcave
@thegamedevcave 4 ай бұрын
Glad you think so!
@mobildisko579
@mobildisko579 3 ай бұрын
I want each map to have its own volumetric fog, light and sky, this method won't work for that, right? Because from what I understand, you actually have to have the same sky setup and lighting, like they're all in the same level.
@thegamedevcave
@thegamedevcave 3 ай бұрын
You shoyld be able to have seperate sky lights and fogs in each streaming level if you need. Or make a system where the color and density of those things is driven by the game mode and whenever you load a level, at the begin play of the level blueprint set the settings you need for that level. Neither is ideal so in this case you might still want to open level the other way instead of streaming levels
@mobildisko579
@mobildisko579 3 ай бұрын
​@@thegamedevcaveThank you for the answer, I tried to understand what this is and what it is not, eventually I realized that it would not work for my situation. Fortunately, I solved my separate level and save system and it wasn't too much of a problem. Maybe you were not aware of this while making this video, some things are born out of real need.
@krisnapradyana891
@krisnapradyana891 28 күн бұрын
Cannnot find World data type 😕
@thegamedevcave
@thegamedevcave 28 күн бұрын
you can add one by right clicking the load level from object node's world pin and promote to variable. for some reason it's not in the list of variable types.
@alexpineda3422
@alexpineda3422 2 ай бұрын
I can't find a World variable type
@thegamedevcave
@thegamedevcave 2 ай бұрын
for some reason this is an issue, if you right click the wrold variable type pin on the load level node you can promote it to variable and it'll make a variable of the right type. Not sure why it has to be done in this roundabout way. I believe you can also use a level variable instead of a world though and that should still work, so that's probably why
@krisnapradyana891
@krisnapradyana891 28 күн бұрын
@@thegamedevcave There is also no Level Variable
@thegamedevcave
@thegamedevcave 28 күн бұрын
@@krisnapradyana891 just add a "load level by object" node and promote the world pin to a variable. I'm not sure why unreal is so annoying with not allowing users to make world or level varaibles in blueprint.
How to use the Unreal EQS - Make enemies Run away from the Player
15:09
The Game Dev Cave
Рет қаралды 1,9 М.
UE5 Understanding hard and soft references - Be a better game dev
19:58
Зу-зу Күлпәш. Көрінбейтін адам. (4-бөлім)
54:41
Каха с волосами
01:00
К-Media
Рет қаралды 6 МЛН
когда одна дома // EVA mash
00:51
EVA mash
Рет қаралды 11 МЛН
UE5: How to Eliminate Client Lag in Multiplayer Games with GAS
10:39
USE Gameplay Tags
10:38
The Game Dev Cave
Рет қаралды 33 М.
HTF do I? Loading Screens using Level Streaming in Unreal Engine 4
14:23
Mathew Wadstein Tutorials
Рет қаралды 66 М.
I solved Unreal Engine's Package Size Problem...
14:35
Cobra Code
Рет қаралды 44 М.
SOFT Object References in Unreal Engine EXPLAINED
11:58
The Game Dev Cave
Рет қаралды 6 М.
Need to Know Nodes in Unreal 5 Blueprints
48:59
Cason Quisenberry
Рет қаралды 60 М.
Самая важная функция в телефоне?
0:27
Опросный
Рет қаралды 215 М.
Рекламная уловка Apple 😏
0:59
Яблык
Рет қаралды 806 М.
Самый маленький Iphone в мире!📱(@ghoul.arena)
0:22
Взрывная История
Рет қаралды 881 М.
Вы поможете украсть ваш iPhone
0:56
Romancev768
Рет қаралды 504 М.
M4 iPad Pro Impressions: Well This is Awkward
12:51
Marques Brownlee
Рет қаралды 6 МЛН
wyłącznik
0:50
Panele Fotowoltaiczne
Рет қаралды 4,2 МЛН