WebGL / HTML5 - Add Online Multiplayer in 30 Seconds to Web Games - Mini Tutorial

This mini tutorial quickly highlights how to add a game server and host it for your multiplayer game online, easily and in minudes thanks to Edgegap's platform.

Chapter 1: Introduction

Here’s how to add game servers and hosting, as to get your Unity game online, in seconds.

Here we go!!

Chapter 2: Editing your WebGL Project

From the editor, select you game scene.

Select its Network Manager. Scroll and remove the default transport named KCP.

Drag and drop a WebGL transport, like SimpleWeb, to the Network Manager.

Update the transport value to your new transport.

Unselect the “Auto Start Server Build” option.

Chapter 3: Game Server Hosting with Edgegap

Start the Edgegap Plugin and input your “One Click” Token.

Input your application name and select “create application”.

Change to the accurate port number, and select the “WS” protocol.

Click on “Build & Push”.

Once containerized, create a new deployment.

With the URL, go back to the Network Manager and replace the network address.

Add the port.

Enable “Client Use W S S”.

Done!

Chapter 4: Conclusion

Well, that was quick!

For a tutorial in real time and that includes an in-depth explanation of every step, check out of the full version of this guide using Mirror’s Tanks sample.

Next in your game development, you might want to add Relays for peer-to-peer networking, or add a free, low code matchmaker to your project. Then, check out our other tutorials.

Thanks for watching!