Motion synchronization in multiplayer game
I am playing with a simple demo where I can walk around in first person in an environment. i used three.js to achieve this.
I want to be able to spawn another player when that player joins and be able to synchronize the Motion of both player so they can see eachother moving around the map. Spawning the player is not an issue, but synchronizing each of the player's movement so they can see eachother is.
I am primarily a web developer so I do not know where to start in doing this efficiently. Would I want to store the positions of each player in a database like mysql or can it be more efficiently stored in memory somehow using node.js? If anyone knows any good resources or has any comments or suggestions, I would greatly appreciate it.
you can use a combination of node.js and socket.io to let the different players communicate with each other in real time.
here's a somewhat similar question which can maybe help to point you in the right direction: