- Home /
Server and network views
Hi. I'm making an online board game. There are some points in the board that when a player reaches there it sends the player to the start point. I wrote the code for it. It works right for the server. and all other clients see the servers displacement. However the same thing doesn't happens for the clients. When client "A" reaches that point, client "A" goes back to the start point but the others can't see it. And it cause problems for client "A"'s next moves. How can I change server and clients views Simultaneously? Thanks
How are you synchronizing moves? Via RPC or via state synchronization?
Is your server authoritative? Who instantiates the player object and allocates their viewIDs?
Details are important. ^^
via RPC. $$anonymous$$y server is authoritative. The thing I can't understand is that I have two function name left and right which is used for the movement of the characters and they are RPC functions two. And all the player can see the other players movement. There isn't any problem with them, I use networkView.RPC("Right",RPC$$anonymous$$ode.Others); to show the players movement but when I try the same way for this function it doesn't work. $$anonymous$$y code for this function(Trees) and right function is this:(I mean to send the movement):
Right();
networkView.RPC("Right",RPC$$anonymous$$ode.Others);
Trees();
networkView.RPC("Trees",RPC$$anonymous$$ode.Others);