I am creating multiplayer game using socket io and three js. I get object with x and z position of all the connected players when any one of them move and now I’m Looping through that object and updating position of the object but of course it’s not good for performance. What could be the best way to get best performance out of this scenario. Also I need to calculate distance between user and all the other player and need to know when there is someone in user’s range. I’m not sure what should I do. I need solution which will run good at 100 users too. Is there a way?
Related topics
Topic | Replies | Views | Activity | |
---|---|---|---|---|
How to draw multiple moving objects effectively? | 0 | 534 | December 8, 2021 | |
Networked 1st person game : everything gets slightly slower every time a new player is added | 6 | 708 | April 22, 2021 | |
Seeking Advice on Three.js Instance Placement Performance | 5 | 115 | June 29, 2024 | |
Many objects caused low fps, can we optimize it without losing control over individual Mesh | 6 | 117 | January 29, 2025 | |
Using THREE.js with SOCKET.io to create a multi-player game | 2 | 5559 | February 5, 2019 |