Multiplayer modes explained

Modified on Sun, 14 Mar 2021 at 04:31 PM

Pirates of Voxel Play allows you to create two types of multiplayer games (click on either option from the main menu):


- Local / LAN game

- Online game


        

Local / LAN game


In this mode, one or more players in the same local area network can play together in the island. At least one of the players must start the game as a host (click "Host New Game"). You can play solo (single player) using this option as well:



Rest of players must click "Find Local Game" button. If they're in the same local area network, the menu will display the name of the server. Click that server name to join the game session started by the host.



Online Game


This mode is intended to play across Internet by connecting to a central/dedicated server. Click "Start In Server Mode" to run Pirates of Voxel Play in server-only mode. In this mode, no rendering is performed to improve performance, so this option is meant to be used when running the game on the dedicated server..



Once you have the server running in a remote server (ie. Amazon AWS instance), players can connect to it clicking the "Connect To Server" button. This option will ask for the name or IP of the dedicated server to connect to the game.


Note: when building your game, you should have two different builds. One optimized for dedicated servers and another for the clients (the public version of your game). This version for your players only should show the "Connect to Server" option and you probably will provide some helpers to let them connect easily without having to figure out or entering the IP of your server. In practice you should purchase a dedicated IP or use a third-party service that can provide the actual IP of your dedicated server so clients can connect easily.



How to deploy Pirates of Voxel Play to a dedicated/remote server


Pirates of Voxel Play uses Mirror as the networking framework. The official Mirror documentation site provides some guides to deploy and configure a server for this kind of games. Please refer to them here: https://mirror-networking.gitbook.io/docs/guides/server-hosting


Generic tips when building a dedicated server:

- In Voxel Play Environment, select the options "Server Mode" and "Low Memory Mode".


If you plan to deploy the game on an Amazon AWS instance, consider these recommendations:

- If you follow the Mirror guide to configure an Amazon instance, use an Amazon t2.medium instance type as minimum for testing purposes. It provides the minimum RAM size to run the server appropriately. Depending on your game, it maybe useful to use a more powerful instance. Note that costs per hour increase with the amount of CPU and RAM.

- If your game uses many networked objects, consider uses Mirror's interest management system (the sucessor to Network Proximity Checker script which can be added to the Network Manager prefab) as a way to control the visibility of the objects based on distance to each player. This feature improves performance considerably as it also reduces the network bandwidth. More info here: https://mirror-networking.gitbook.io/docs/components/network-proximity-checker






Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article