Why is the match ID sent in every network message, won't this affect performance?

Hi,
In multiplayer games, it seems that each transmission carries match ID data. If tick rate is 60, it will generate a lot of traffic

Does match id not need to be carried in all sockets?

1 Like

@xiaoNiuNew yes match id is necessary because a client can belong to multiple matches.

I think by “tick rate” you actually mean “frame rate.” Tick rate means something different on the server. I wouldn’t worry about the match ids being in there from a performance perspective because it’s a very small amount of data.

1 Like

Thank you for reply.
Yes, tick rate I mean is that : server send 60 socket packets every second to client (some pvp game are sensitive to operation delay)

@xiauNiuNew no problem.

@xiaoNiuNew The match ID is 16 bytes when carried over our binary transport (protobuf) whereas the text representation is larger. We can definitely look to optimize that to be smaller but it is more complex than just the format of the ID because of a few different considerations:

  • Users can be a part of more than one match multiplexed over the single socket connection so the server needs a way to disambiguate.
  • The match ID must be globally unique across all matches. This is much easier to guarantee across our distributed cluster system with UUIDv4 format.
  • The binary format is far more compact but can only be used with our client SDKs that support it.

Happy for any suggesttions you can share that fit the requirements above. :+1:

3 Likes