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 | |
|---|---|---|---|---|
| Networked 1st person game : everything gets slightly slower every time a new player is added | 6 | 723 | April 22, 2021 | |
| Trying to create interactive video conferencing web app | 0 | 683 | December 1, 2021 | |
| How to repair this nodejs threejs multiplayer server?: | 5 | 61 | December 21, 2024 | |
| Using THREE.js with SOCKET.io to create a multi-player game | 2 | 5747 | February 5, 2019 | |
| How to draw multiple moving objects effectively? | 0 | 544 | December 8, 2021 |