Hi,
What i try to achieve, is a local couch game with multiple players with multiple gamepads on the same PC/Console viewed from the same camera (not split-screen). The problem is:
How can i keep the data between levels, for example:
First i show a level where everybody can select their character and after on the next level the real game begins. I have to keep the selected character data for every player between levels.
I tried to find the answer for this question in many places. I found more options, but none of them seem perfect for me.
- Seamless travel and keep in PlayerState - Seems the obvious answer, but for seamless travel i have to use ServerTravel which is for multiplayer Server/Client architecture. It’s not an overkill? I don’t have clients, only one game instance no network connections. Or i’m just overthink and this is the answer for this type of problems, and the ServerTravel name just a bit misleading?
- GameInstance - It can work, but it sounds good only for single user scenarios. Obviously i can keep every user data in there, but i think it’s a bit hacky solution. Thats why i have PlayerState object for every player, to keep player related data there, not in the GameInstance.
- Store and load from config file in filesystem - The worst of all.
Use the persistent storage to pass data between two temporary objects in the memory… Every cell in my body protests against it. - Something other ???
I know, all of the above solutions can work. But i would like to know the correct answer, the Epic preferred way to solve this. Not a working hacky solution.
Thank you!