Originally Posted by
wolfajk
We still gotta send the updated direction and move type bits per other players though? I really don't understand how my local players client is going to be aware of other players movements without the server explicitly saying so, and it's even in the client code lol. My question wasn't really this though, it was about how to approach this. I've updated my post with a general idea.
Also appearance updating is done in two parts, the local players and other players, as is the movement...
No you are not wrong. Your client will not know without the server saying so. That's the point. The server sets the bits for every client in the player list every cycle. It knows the index and you have told it how many players to update, so it loops through and does this for every player in the list. It then sets the bits by a loop.
Code:
for (int I = 0; I < 5; I++) set bits
Pseudocode on a phone is actually hard to write lol but point is every cycle your client will be told because you have told the client which index to loop and yes you're wondering how it will know if two players have different values set. They will know because those players will have two different flags set, and they will be told to the client. One might be running, one might be walking. You need to tell the client this but not individually, just set the bits to work out if the player is walking or not and change it for the current player.
Anyway I don't think we're getting anywhere if anyone else wants to weigh in go ahead I'd be interested if I'm wrong but it works on my server so yeah.