Hi,
We are evaluating Nakama for a realtime web game, we are very pleased with the API and the performance (even more pleased with v3.0 and JS/TS support!).
One question we have is how can we add conditions to messages, so we can restrict who can send messages to who through his socket.
For example if we have an open world map with 50 players scattered on the terrain, we would like to add a distance check to how far you can see other players. What would be ideal to us would be:
- As soon as a message from a player to server we do a check against the distance of this player from each other player we are about to send it to. If the distance is greater than a limit we don’t send this message to this player.
To be able to do that we imagine we will have to store somewhere in memory the last known position of each player.
Could you let us know if that is possible and what would be the way to do this? Ideally we would prefer to use the new Typescript system on the server, if that’s possible.
Thank you,