question

Alan Gaspar avatar image
Alan Gaspar asked

Set multiplayer server custom data

I'm creating a multiplayer server where the players can send an invitation to their friends to join, but the players can only join on certain moments, I wanted to update the server data or something like that to know the status of the server before the player tries to join, is this possible?

multiplayer
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Gosen Gao avatar image
Gosen Gao answered

You can create a data structure to store the information of joinable players, and when you invite a friend, you upload his information and expiration time into this data structure. Then you can send the server detailed info to this friend to let him join the server via the IP and Port. When the server receives a new connection, it should first compare the information of the connector with the joinable list to determine whether the player is in the list and whether the joining permission has expired. Only if he is authenticated will he be connected to the game service.

1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Alan Gaspar avatar image Alan Gaspar commented ·

Thank you a lot! I'm going to try to do something like that

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Error rendering WebPanel (widgets/consolidation-widget.ftl): org.hibernate.hql.internal.ast.QuerySyntaxException: AvailableConsolidation is not mapped [from AvailableConsolidation up where up.node = :node]