I have a TMap of FVector2D and bool for a grid and check if the position is occupied or not, I don’t have much experience with replication and I know that TMaps can’t be replicated as Unreal doesn’t allow it. The thing is that I don’t want to replicate the TMap because I want the calculations to be done in the client and not in the server, and if at some point I want to send something to the server, then I will create a structure that is like a TMap to replicate it, but I don’t understand very well how all this works because right now I thought that if I didn’t replicate anything all the calculations were done in the client but when I’m debugging I realise that the only place where the values are updated is in the server that appears in the editor (which I don’t know very well because it appears a server and a client for each player).
these lines only updates the data in the component of the Server, spawned
When you run Listen Server - editor viewport displays the server player. If you do something with this player - then the data should change on the server, because this player is the server.
What is the trigger for changing the value? It is an overlap event or something? It will work for everyone, and your value will change synchronously for everyone (including the server), since the event will work for it too…
what I dont understand is why when I pressed play on client, I dont have the client associated with the playercontroller1, so only the data is displayed in the playercontroller1
That’s how the engine works. Only the server has all the players’ controllers. Clients only have their own controller.
Ignore the same names on clients (0), this is a local name.
Controller 0 of client 0 - is linked to controller 0 on the server
Controller 0 of client 1 - is linked to controller 1 on the server