Hello,
I’m creating an adventure game with Unity and am wondering what the best / most efficient and tried and tested way is to store the player’s adventure progress. I’ve looked around for a while and can’t find anything, but if I could be directed to something else I’ll delete this thread
Note that I am not talking about storing variables in general - I know all about playerprefs and all that. But, say you have a cabin you can talk to people at, and depending on what you have done / what you are doing the cabin may have different people in it or be deserted, based on where you are in the game. How is it that the scene of the cabin interior knows how many people to have in it?
All I can think of is that you have a whole big list of bools stored in playerprefs that the game accesses when it loads the scene and populates it accordingly (or perhaps there are different scenes for each cabin a game manager decides which one to load - whatever, it is inconsequential - my question is more about the bools). It seems like on paper it would work, but it also seems on paper that for a game of any substantial length that list of bools would quickly grow unweildy and get out of hand.
This is especially true for quests. I imagine that when you embark on a quest, you would have a bool to check when you are on it, so that the game can set up the quest stuff when you load scenes, and then when you complete it another completed bool is checked, or you could even have multiple bools for checkpoints along the quest. Maybe an NPC only appears here after you’ve talked to this other guy. Either way, it’s a lot of bools and if then statements
Is this how it is done? Or is there a more efficient way?
Thanks