Multiplayer : need some explanations about player spawn and game elements

Hello everybody,

I’m a beginner with UE4 and I’m trying to use multiplayer on my project, but there are some incomprehensible things to me.

First at all the good use of the different elements, if I get it right it’s works like :

Gamemode : only on server, this is here where a new connection is allowed or denied, if a team win or loose, it’s the referee of the game.

Gamestate : the same instance of this is replicated both on server and clients, this here where we store game data like score, players list

Playerstate : each clients (and the server) has its own playerstate, and cannot access to the others clients’ playerstate, this is where we can create a new player and store the player personnal stuff.

Gameinstance : to store data between level and loading, is replicated both on clients and server.

Am I right ?

Second question about the players spawn, what ‘create player’ node does ? because if I want a 10v10 players, how can I manage all the client’s controllers id, their team, their spawn point with ‘create player’ function which apparently don’t get any parameters about the player and only use settings in the project settings and the “player start” for spawn ?

Thanks so much for your help.

Game Instance is not replicated. Every player has one. But I’d like to have someone explain this a little bit better. For example. When you try to access the Game Instance from a PlayerController inside the ChoosePlayerStart method, it returns a null pointer. What options do I have for transferring data between clients before the Characters Spawn?

this can be very usefull to understand where object are, and which are replicated, and what for:

From my mind, don’t use create player. As a player will join your party, it will call internally the create player. It will give him an id, a player controller, a pawn (if you have default pawn), make the possession.

Create player must be used in specific case, not in general case. let he engine create the player for you