I want to implement a strategy/artillery game, similar to Worms/Arcanists.
As game-development (and game-networking especially) is new to me, I was wondering whether this would be a good/performant way to do the movement-networking:
- Server has all client's positions.
Moving-client to server:
Message: [start-moving, moving-direction]
Server now starts a simulation of the moving-client moving.
Server to all clients, except originating one, every 100ms(?):
Message: [set-client-position: client-id, new-position] ^ new-position calculated by the server's simulation
Clients lerp the moving-client's position.
Moving-client to server:
Message: [stop-moving] ^ server's simulation ends
Server to all clients, including originating one:
Message: [set-client-position: client-id, final-position] ^ all clients have the same position for the moving-client in the end