question

maria-1 avatar image
maria-1 asked

How to have all players connect to just one server that allows 100 players at once?

I am trying to connect players to one server that allows 100 players. I have followed the mirror example and locally tested my build and the only issue I am having is figuring out how to connect all the players together on only one server. Right now my player count always says 0. Any ideas on how to fix this? Like I said, I have been using the mirror sample from the documentation and haven't had any luck on getting it working.

Custom Game Serversmultiplayer
10 |1200

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

Xiao Zha avatar image
Xiao Zha answered

If your server build deployed successfully, after the server instance is on standby, you can call the Request Multiplayer Server API to get a multiplayer server session, and the server Ip and port are in the API response, which you can share it with other players so that they can connect to the same server session, and the maximum number of connected players depends on your needs. Note that you need to implement your own client code based on your server code to connect to the server (in your case, you can use Mirror's connection method with the IP and port to connect). Also, to make the player count display the number of connected players, you need to maintain a connected player list on the server and update the list when new players connect, you can refer to the OnPlayerAdded method in the Mirror sample.

6 comments
10 |1200

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

maria-1 avatar image maria-1 commented ·

what is mirrors connection method? Also is there a way to automatically connect to the server? everyone who connects will be on the same network, is it possible just to connect to that IP or something? I am new to working with networking.

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha maria-1 commented ·

PlayFab doesn’t provide such method to automatically connect to the server. And if you want all players connect to the same server instance, you can use PlayFab Matchmaking service with MPS, and after all player matched, they can get the same server info to connect to the same server instance. For more information, you can refer to Integrating with PlayFab Multiplayer Servers - PlayFab | Microsoft Learn. Also, since we are not familiar with Mirror, you can seek professional help from the Mirror team to implement your own connect method.

0 Likes 0 ·
maria-1 avatar image maria-1 Xiao Zha commented ·

what I am looking for is for players to be able to join the server whenever, I don't want them to all have to match at the same time,

0 Likes 0 ·
Show more comments
AWS avatar image
AWS answered
 http://www.moh.gov.sa/https://www.android.com/enterprise/solutions-finder-other/?recommended=android-emm&selectedFeatures=device-listing,enforce-pin-or-passcode,separate-work-personal-data,pre-configure-apps
 1600 Amphitheatre Parkway
 Mountain View, California 94043
 USAhttp://www.moh.gov.sa/
10 |1200

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

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]