Can a web game be sold on Steam?

Yes, as a desktop app. Steam installs and launches executables, so a browser game needs a wrapper that opens it in its own window. Valve says the Steamworks SDK is only required to upload content, so a wrapped web game does not need the Steam API to be sold.

Vampire Survivors is the best-known example. It was released on itch.io in March 2021 and in Steam Early Access in December 2021. In August 2022 its creator said the version people were playing was still built on HTML5 with Phaser. Phaser says it was the original engine until the 1.6 update.

Sources: Steamworks SDK documentation; Barclays Games and Creative (10 August 2022); Phaser (29 February 2024).

Which wrapper should I use?

Use the one that your engine supports, or Electron for custom code. Electron embeds Chromium and Node.js, so one JavaScript codebase runs on Windows, macOS and Linux. Construct exports with WebView2 on Windows, which uses the browser engine built into Windows instead of bundling one, so the files stay small. It can export for x64 and for ARM64 Windows devices.

NW.js is another Chromium wrapper. Construct's older Greenworks plugin for NW.js must match a specific NW.js and Steamworks SDK version, and Scirra now recommends its WebView2 plugin instead.

WrapperHow it runs the gameNote from its documentation
ElectronBundles Chromium and Node.jsOne codebase for Windows, macOS and Linux
WebView2 (Construct)Uses the Edge engine built into WindowsSmall files; runtime needed on the system
NW.js with GreenworksBundles ChromiumMust match specific NW.js and SDK versions

Sources: Electron documentation; Construct WebView2 export tutorial; Construct Steamworks plugin documentation.

How do I add Steam features to a web game?

Through a native bridge, because browser code cannot call the Steamworks API directly. Construct's official Steamworks plugin works with its Windows WebView2, macOS WKWebView and Linux CEF exports. It covers user details, the overlay, achievements and DLC.

The overlay is the hard part. Scirra says the in-game overlay works on Windows and Steam devices through a workaround: a transparent surface over the window. Some features, such as in-game video recording, may then capture that surface instead of the game. On macOS and Linux, Steam shows its own interface instead.

Sources: Construct Steamworks plugin documentation.

Which Valve rules matter for web games?

Ads and outside payments. Valve lists apps with advertising-based business models among the content it does not accept, so remove ad SDKs from the Steam build. Valve also requires in-game purchases to use Steam Wallet, and the store description cannot link to other websites.

The usual build checks apply too. The game must start on every operating system listed on the store page, and every feature listed on the page must be in the build.

Sources: Steamworks Onboarding documentation; Steamworks Review Process documentation.

What are the steps to ship it?

Wrap it, test it offline, then upload with SteamPipe. The store and review steps are the same as for any engine.

  1. Remove ads, outside payment links and anything that needs a web portal.
  2. Wrap the game with Electron, NW.js or your engine's desktop export.
  3. Load all files from the package so the game works without a connection.
  4. Add a Steam bridge only if you need achievements, the overlay or DLC checks.
  5. Test the build on a clean computer and on each operating system you list.
  6. Upload it with SteamPipe, add a launch option, and submit it for review.

Sources: Steamworks Uploading to Steam documentation; Electron documentation; Construct WebView2 export tutorial.

When should I port to a native engine?

When you need consoles or mobile, or performance limits hurt. The creator of Vampire Survivors said HTML5 limited where the game could go: the mobile version was "absolutely unplayable". The team then rebuilt the game one-to-one in another engine, and he said the port took way longer than expected.

For a PC-only game that runs well, the wrapper is enough.

Sources: Barclays Games and Creative (10 August 2022); Phaser (29 February 2024).

How do I track a wrapped web game?

Use the web SDK with the app option. The events stay web events and also carry the build, version and storefront. In Electron, a page loaded from file:// has no page URL on your domain, so its events are refused. Serve the page from an https:// URL on your project domain, or send events from the main process with the Node SDK.

Set storefront to steam in the Steam build. The field takes steam, itch, epic, gog, app_store, play or other, so each store version can be read on its own.

Sources: Manalens app events and web SDK documentation.

What does a WebView2 build need on the player's computer?

The WebView2 runtime. Scirra says it is installed by default on Windows 10 and newer, and built into Windows 11. If it is missing, the app asks the player to download it once. You can also bundle a full copy of the browser engine, which Scirra calls fixed mode.

Gamepads need care. Scirra says browser gamepad input does not work in a WebView2 game on Steam, so Construct reads GameInput directly instead. GameInput may need its installer, so set your Steam game to run it during install.

Sources: Construct WebView2 export tutorial; Construct Steamworks plugin documentation.

How do I compare the web and Steam versions?

Manalens is the analytics and growth engine built for games. Set storefront to steam in the Steam build and to itch in the browser build, then compare retention and funnels by storefront and build in one project. Tag links from the web version to Steam with the Steam UTM builder.

Sources: Manalens product documentation.

Frequently asked questions

Do I need to rewrite my HTML5 game for Steam?

No. Wrap it in a desktop shell such as Electron, NW.js or a WebView2 export. Vampire Survivors sold on Steam for months while still built on the Phaser HTML5 framework. Its team later rebuilt it in another engine to reach mobile and consoles, which took longer than expected.

Can my Steam game show ads like the web version?

No. Valve lists applications with advertising-based business models among the content it does not accept on Steam. Remove ad SDKs from the Steam build. Valve also requires in-game purchases to use Steam Wallet, so a web payment flow must go too.

Does the Steam overlay work in a web wrapper?

Partly. Scirra says Construct's plugin supports the in-game overlay on Windows and Steam devices with a transparent surface over the window. In-game video recording may capture that surface instead of the game. On macOS and Linux, Steam falls back to showing its own interface.

Should I keep the free browser version online?

It can help. The Roottrees are Dead kept its free itch.io version while it sold on Steam, and Chris Zukowski argues that free versions do not necessarily cannibalize sales, because early players become ambassadors. Link the browser version to the Steam page with tagged links to count the wishlists it sends.

Sources and implementation