Easy WebGL hosting with PlayFlow
Simple tutorial showing how easy PlayFlow makes it to host a server for your WebGL game.
How PlayFlow makes WebGL hosting easy
For seamless WebGL gaming experiences in web browsers, secure WebSocket connections are crucial, but configuring them can be complex. Often, developers end up managing certificates and networking issues, which can be time-consuming. With PlayFlow, however, you only need to enable a simple option to handle these concerns effortlessly.
Before we begin...
This tutorial assumes you've read the Getting Started with PlayFlow tutorial already. In the following steps we will convert our project support WebGL.
Install Bayou
For FishNet connections on WebGL we will need to use a web supported transport; there are multiple available, but this tutorial will be using Bayou. Head over to the Bayou Github repo and download the most recently released unitypackage
file and then import it into your project.

Add Bayou to your Network Manager
Now that Bayou is imported into your project, you can select your NetworkManager and add the component to it.

Set the correct PlayFlow port protocol
Open the PlayFlow dashboard in your browser and navigate to the Configuration tab. Edit or add your port and choose the TCP protocol and be sure to Enable TLS.

Building your WebGL client
Now let's build the WebGL client. In your Unity build profiles, be sure to switch to the Web Platform and then build your game. Once that's done you can zip the built files and upload it to your chosen hosting site and run your game in the browser!

For this test we have created a project on Itch.io and uploaded the client build to it.

Success!
Just like that, we were able to create a server and have our clients in the web browser securely connect to it. If you want to check out more of their features, you can check out their documentation here: https://documentation.playflowcloud.com/
You are also encouraged to join their Discord server here: https://discord.gg/P5w45Vx5Q8
Last updated