I’m making a network game, and in my game there is a lobby map and a game map. Players select their characters in the lobby and then their characters spawn in the game.
The problem I’m facing is that I can’t pass the character parameters in lobby to the game map. I’m not using a seamless travel since the gamemode is changed and it is the first time the map is loaded. So the clients disconnect and reconnect to the server. How could I MATCH characters and players?
What I did is record a playername in playerstate, and save it in local computer. When the map changes, the new playerstate loads the name and replicates it. Then Server gameinstance matches the character and the name.
Yet, it is not a good idea because both replication and matching have lag depend on the net, and if the server matches before the replication, there would be errors.
Are there any better solutions?