I'm creating a multiplayer platformer game with 4 players in multiple rooms. I've read a lot of articles and researched about client prediction and lag compensations. I think I can somehow manage to understand how to update "my client". But what would be the best approach in the multiplayer platformer game to update "other clients". This is what I'm thinking:
Approach 1: the client sends input "left" to the server -> server increases the velocity of the player -> the server sends the actual input "left" of this client to all other clients -> other clients run the physics on the input.
Apporach 2: the client sends the input to the server -> server adds velocity, update state -> game loop in server updates the position of every single client back to everyone, sends it to all clients -> client gets it and updates.
What would be a better approach? or please if there is a better approach, tell me I am very stuck..