Best way to implement a level-chain
I'm stuck with an architectural problem: In my game I want a central way of managing levels. More concretely: I want to organize my levels into chapters and store some additional information per chapter and per level (which I need to be able to persist on disk later on, since the information will change when the player completes a level). The structure would look something like this:
Now I need to store an array of chapters somewhere and the place that appeared best for that in my opinion was the gamemode, but I'm not bound to that decision. It needs to be, however, in a globally accessible place (across levels). I want to be able to edit the array of chapters in the editor (so it's easy for artists to add new levels without the need to go and change code) which means the array needs to be a UProperty.
Do you have a recommendation on how I could/should implement this? I have tried creating FStructs but I wasn't able to use them as properties (the property didn't get persisted and was reset whenever I reloaded the project; I'm quite confused about this behavior because I used the BlueprintType specifier in the FStruct macro). Then I created UObjects but I can't really use something which needs to be instanced, since I'm not able to create an instance of an object in the editor (at least not of a UObject; and actor types need to be placed in a specific level wich doesn't work either).
I'm very interested in your thoughts about this problem and would be enormously glad if you could share your experience, in case you implemented similar logic! Thank you in advance!
asked Sep 25 '17 at 07:13 PM in C++ Programming
For constant level information, you can store that in a
For example, if you want to save the progress of all your levels. Maintain an array of structs that hold that data in you
Below I'll show how I store my linear game's data:
Follow this question
Once you sign in you will be able to subscribe for any updates here