Member-only story

Deploy a Unity game to the web using WebGL and Express

Create awesome games and play them directly in your browser

Chanon Roy
4 min readSep 9, 2023

Unity is a powerful and user-friendly engine that greatly simplifies the game development process. Developers of all levels can build captivating 2D and 3D experiences on a wide range of platforms, including for web.

In today’s post, we’ll show you how easy it is to export your game for WebGL and deploy it using a simple Express server.

📚 How can we run Unity code in web?

Since 2018, Unity’s output format for WebGL builds use WebAssembly (a.k.a Wasm), which allows you to run code written in multiple languages on the web at native speeds. The adoption of WebAssembly by Unity replaced asm.js as an export format and had the advantage of faster, smaller, and more memory-efficient builds.

📦 Exporting your Unity game for WebGL

For my game prototype, I put together a small open-world Firewatch clone using the Unity engine and a few free assets. The game itself is quite simple, you can walk, run, and jump around a low poly environment. I hope to add more gameplay elements at some stage, such as including a few curious bears to chase you around the map 🐻.

--

--

Chanon Roy
Chanon Roy

Written by Chanon Roy

🧑🏻‍💻 I write about tech and programming. I'm also fluent in film references

Responses (2)