We are readying ourselves to start converting our project from Unity. On Unity, I had developed a scenario manager that was the only object, aside from the terrain, within each Unity “scene” (quotes indicate that we used their “scene” as a level). It’s purpose was to manage cut and play scenes including level and scene-section intro music and graphics, lighting, skybox etc. It did this based on large list holding all the objects/prefabs to be spawned and destroyed as it kept track of player progress. It spawned / created colliders and counters to determine if a section was completed or not. It also had the ability to customize the scene if it was played through previously and was changed by external events (e.g., had already unlocked certain weapons in previous play-throughs). My concept there, was to keep the current scene/level void of all but terrains and manage what was placed and removed from the scene (as opposed to having the level have everything in it from start to finish and be forced create smaller game play sections for each level). We defined the level as everything that can happen in one terrain layout, and this manager let us control what went on in that terrain. I would like to do something similar in UE4 if it’s necessary.
UE4 appears to have features that will make implementing this pretty easy, but my dilemma is where to implement it. I’ve been studying and am quite unclear what to base it on. Is AGameMode the appropriate place to perform this type of management. AGameMode appears to be for this purpose and has some generic related features, but has irrelevant features for the type of game (A FPS/TPS hybrid that is predominantly linear and moves sequentially through a story), such as networking / server, management of more than one player etc; we have no multiplayer plans whatsoever. Is there a better class to start with to place an over-arching level manager of the game? I developed what we used in Unity because there was no native capability, perhaps there is a native capability in UE4 and I am missing it? I don’t want to start blindly forging ahead and have to start over when I learn more about UE4.
Edit: Is it possible I am actually looking for Level Blueprint / ALevelScriptActor as the appropriate place to implement the above?
I’m necro’ing my own thread since I never received responses. It was probably not described well enough. I am going to try again since I’m at the point where I have to build a game management table.
Throughout all last decade, every game I looked at or modded, had a metadata that drove the game. I don’t see any built-in like this within Unreal. Unreal appears to work off “Levels” and you place everything in “this” level you want, run through the level and then go to the next. This is not a dynamic approach, there has to be a script (not the programming term) or scenario that is defined in a metadata data base, and so I assume people must develop their scenario programmatically. I called this a “scenario manager” in my OP above. The scenario manager reads a metadata resource that lists all objects and control colliders that impact how the scene is played out. Colliders may trigger AI spawns, Vehicle spawns, cut scenes, etc. Counters within such a manager, determine things like whether the player has killed all the enemies and thus other spawns and such are then done. Having a manager like that permits dynamic decisions based on game play as to what will be spawned or whether the player is choosing to play the game in one, of potentially many, alternative scenarios.
I am now thinking that I may as well let the playercontroller read and act on this metadata, as I’m not sure gamemode has any role in a single player non-networked game (I understand it may, but I can’t see any use for it). Either would be fine. Surely, someone has developed a game where they’ve used a metadata/scenario manager of some sort. If you have, where did you place it?
I recognize that maybe no one frequenting the forums builds a game in this manner, but even a wild guess would be helpful.
For level information pertinent to a specific scene, I personally would use the level blueprint. If you have something that is going to run between multiple levels but involves your game as a whole, gamemode is definitely the way to go. Playercontroller should be used for anything directly relevant to the player such as movement, calling widgets, possessing pawns, etc. so I wouldn’t recommend putting scene information in there.
, Thank you very much for the reply. I hadn’t considered Level Blueprint because I couldn’t see how to extend it to C++ easily. I will research that again, it’s been a couple of months.
I realized that PlayerController was not the correct place, but it was tempting because a lot of pointers were easily available to it. That is probably a function of how I set things up for all my testing rather than it being an innate central location.
I will revisit Level Blueprint and once again, thanks for the kick in the right direction.
, Thank you very much for the reply. I hadn’t considered Level Blueprint because I couldn’t see how to extend it to C++ easily. I will research that again, it’s been a couple of months.
I realized that PlayerController was not the correct place, but it was tempting because a lot of pointers were easily available to it. That is probably a function of how I set things up for all my testing rather than it being an innate central location.
I will revisit Level Blueprint and once again, thanks for the kick in the right direction.
[/]
Happy to help. Unfortunately my knowledge of c++ is exceedingly limited, I’d post a thread in the C++ forums for further assistance on that front if needed!