Okay, I’m trying to learn about level streaming and what it is and instances and everything and I cannot find a single video explaining it in simple terms. Basically I’m just trying to figure out what’s usually the norm to use in what scenario and how games in general with different levels are put together.
How do developers package games with a lot of levels all into one project and game
I have a game that has a mini puzzle in it, but the view and stuff is intended to change when the player interacts with it. So should this be a different level or the same level just put somewhere different in the scene???
I know how to load different levels, but not to where when the player exits it, they will be exactly where they were when they activated the puzzle/minigame. which leads into point 4.
When trying to look up how to save games and level progress, I’ve seen how you can save certain variables, but what about saving everything/the overall status of the game?? Like, for bigger games, do they actually save and store each variable of everything like stats and which NPCS you have or haven’t talked to? Or is there a way that multiple things in multiple levels can be saved without having to specify every single one?
2 This is not a separate level, it would probably be a view target
3 It’s totally up to you to manage how and when the player appears in the game. There is not fixed way of doing it. Yes, you can save the player location and progress in the save game, but acting on that really depends what sort of level structure you’re using. It’s totally possible to have a multi level game just using ‘open level’, but streaming will give the player a more seamless experience.
4 There is a ‘save game flag’ in objects that can be set, and then used later
But most people just code the actors to save their progress and load it again later. With NPCs etc, they just have to save the fact the player has talked to them, and load it again next time the game runs.
There are a lot of ways of using streaming, but the main ones are
1 Streaming volumes
2 Blueprints
3 Using level instances - specifically here I mean the nodes ‘load streaming level by name ( or reference )’
Thank you so much for these resources!! But, I’m having a little trouble switching cameras. Basically the default game is in third person, but when this mini puzzle activates I want to switch cameras to the other one I put into my scene via place actors. I have this camera and the puzzle set up a ways off from where the main map is. But I have no idea how to reference this camera actor. I’m following the first tutorial you linked but he doesn’t explain how he got the camera actor. I can’t even get the reference for it when I search in the level blueprint (image below).
Thank you so much! This worked well! I actually programmed it so that entering the minigame/puzzle is triggered by a key input, but exiting out is with a widget. This made things a little tricky and I have a lot of casting. I’m still trying to get the hang of knowing where the best place to put nodes and functions or logic in.
It was hard because I noticed I couldn’t add references to any other camera except the player camera in other blueprints, AKA I had to switch to my secondary camera in my level blueprint, which also made it tricky because I had variables in my level blueprint that I couldn’t cast to other blueprints.
I also put the input action in my level blueprint which checks and triggers if the player is overlapping with the puzzle, which I know isn’t necessarily good for optimization. Do you have tips for this and communication between level blueprints and actor blueprints? And I will still check out the other resources you left me as well!
If you use ‘set target’, you just have to give it an actor reference, it automatically finds the camera.
Basically, don’t try and communicate with the Level BP.
All of this can be done, just with a normal player, and a BP with a camera in it. If you only want to show what that camera sees ( without movement, like a cut scene ), just use ‘set target’. If you want some control, make it a pawn and use ‘possess’.
Making the puzzle a level is probably not helping much :), you can put quite a lot ( like a whole room ) in a blueprint, and just put that in your level ( or spawn it ).
The puzzle itself isn’t a puzzle. I have my level blueprint setup to where when I’m overlapping with the collision box, I can hit the trigger key, which then sets a view target. My issue was that I couldn’t set up a reference for my other camera anywhere except the level blueprint. In other blueprints I could set up the character camera just fine, just not the second one I put in my scene. Are you saying that the second camera needs to be in a blueprint that I cast to?
I see, so the blueprint is in the blueprint that you’re interacting with? Also I appreciate you being willing to answer my many questions! I’m still a beginner, so I’m still getting the hang of things.
But you see, my blueprint that triggers the event is actually different than the puzzle blueprint that uses the same static mesh components, and the trigger for activating the puzzle is the Enter key, which is also used for other things as well, hence why it will only activate if the player is overlapping with the blueprint. So wouldn’t the second camera for the puzzle need to be in the target blueprint that triggers the puzzle so that if the player hits Enter and they’re NOT near the puzzle, it won’t switch to the second camera for no reason?
There’s also the factor that I want to disable the function to interact with the blueprint trigger once the puzzle is solved.
(EDIT) That’s why I’m trying to create a reference for my secondary camera inside the blueprint trigger but I can’t. I also tried adding the camera to my puzzle blueprint, instead of what I did earlier which was just dragging it into the scene.
Just now I also tried adding another camera to my 3rd person blueprint, and setting the world rotation on event begin play. But not only can I not create a reference to it even after selecting it in the 3rd person viewport, but it automatically attaches to the capsule component and affects everything else, where I just want it to stay in one place.
Obviously I haven’t actually implemented a puzzle here, but the DoOnce node will stop the player interacting move than once. In fact, you’ll need to stop them interacting if the puzzle is solved, just a bool. But… if the can quit the game and come back later, then you also need to use the save game to record the fact this puzzle has been solved, otherwise they can interact with it again.
It adds the middle ring after blending, and uses a blueprint interface to call back to the puzzle from the widget.
I still didn’t use a separate Saturn BP, because it’s just going to look really weird when the player walks up to this, presses enter, and then the camera move to a totally different place to execute the puzzle. It’s up to you, but I don’t think there’s a smooth way of doing it.
It looks like this
If you still specifically want to have a different BP elsewhere for the puzzle, perhaps you can describe what the effect of changing would be like. Do you mean you want the Saturn puzzle to be set in an outer space level, or something like that?
The reason I have a separate Saturn BP is because I feel like I’m not at a level yet to feel confident about creating more complex blueprints. So to have one where the first ring isn’t visible, and then is, and then you take control of each of the rings to rotate them in a way to solve the puzzle, all while taking into account highlighting each of the components that the player is overlapping is a bit much for me. The other reason why is because I want there to be more detail when the player examines the puzzle more closely.
I also want a fade out and fade in transition when entering puzzles and minigames, which is just sort of the feel I’m going for with my game.
One of the problems though, is that I can’t seem to even get a reference to any cameras now. I could only do that in the Level BP, which is why I initially stated doing my other code for switching views there.
You shouldn’t be trying to reference cameras, just actors.
If you want to have some sort of control after switching, the possessing a pawn is a better idea.
It looks like ‘view target with blend’ is not a good fit for you, because the player will have the idea they are using a different puzzle. Fade out and fade in is possible by using a post process.
So you’re saying the camera shouldn’t be on its own, but in its own actor blueprint that can be referenced? I haven’t worked with pawns a lot, so this is still a bit new to me.
Okay, I’m extremely confused and this engine is really frustrating and making me upset.
I don’t understand this, I made an actor with a camera, I’m trying to reference it, I can’t.
I can’t get a set view target with blend node, and I cant create a reference to anything anywhere.
I’ve tried having the camera as a separate object, tried putting it in one of the saturn blueprints, and tried having it in my third person blueprint and setting the location of it.
The only time I’ve gotten the effect I’m going for is when placing the code in the level blueprint, but I want to practice good habits so I can’t do that.