Suppressing presence events sent to client

My game uses the lua runtime and lua client code.

The join/leave messages are handled by custom code picked up by the client with socket.on_match_data(). This means events sent to the client that are picked up with socket.on_match_presence_event() are superfluous.

Is there a way to suppress the socket.on_match_presence_event() events being sent to the client, to save on server bandwidth and CPU?

Alternatively, is there a way to tag on information to the match presence events, so I can use those instead of sending custom events for join/leave?

The additional data I need to send when players join are position, tint colour, display name and other properties describing the players.

Hey Totebo, the match presence events comprise such a trivial amount of data that it won’t matter to your server performance.

We don’t provide a way to tag presence events with metadata but you should have each player send a MatchData payload after they join with their properties. That way you can potentially reuse any opcodes there for future changes to position, etc.

1 Like

I thought that might have been the case. Thanks!