Web Games
←back to documentation

Web Games

Ship your own HTML, ThreeJS and JavaScript game on Portals with player identity, multiplayer, coins, avatars, and server logic.

Web Games

A web game is an HTML and JavaScript project that Portals hosts and runs for players. It is the second way to build on Portals: instead of placing items in a 3D room, you ship your own code, and Portals supplies the player, the network, the storefront, and the page the game runs on.

Portals injects its managed SDK into every processed preview and published bundle, so a game reads the signed-in player, saves progress, submits scores, sells Coin products, and opens multiplayer sessions through one host connection rather than a backend of your own.

Room building or a web game?

You want to Build
Place, configure, and connect 3D world content without code A room — start at Build Your Game
React to player actions with visual logic A room — see Interactive Studio
Ship your own rendering, physics, or game loop in code A web game — start with the Portals SDK
Add a custom interface inside a room you built Neither — see Code & Custom UI

What the sandbox allows

  • External networking is blocked by default. Portals can approve exact secure WebSocket or HTTPS service origins for an existing game so its multiplayer and connected services continue to work. Portals.net and Portals.voice provide managed networking without external permissions. See Multiplayer, Chat, and Voice.
  • Portals keeps its own controls above the game in the top-left corner. Keep interactive interface elements out of that reserved area.
  • A published game's source is readable. Never put keys, secrets, or credentials in game code or saved state.
  • Scores and peer messages are client-reported. Anything valuable — currency, prizes, access — must be decided by server logic, not by a player's tab.

Where to start

You want Read
Sign-in, saved progress, scores, and leaderboards Portals SDK
To build the game from Claude Code or Codex Claude Code and Codex Plugins
To sell products inside the game for Coins Sell game products for Coins
The player's Portals avatar in a Three.js game Portals Avatars
To tune procedural animation numbers live instead of edit-and-reload Pose Tuner
Real-time multiplayer, text chat, or voice Multiplayer, Chat, and Voice
A referee no player controls — lobbies, timers, authoritative state Server Scripts
The server to run the simulation itself Server-Simulated Games

Games are managed from My Games, where you also publish a version and share it with players.

Remixing a published game

Any signed-in player can choose remix this game on a published web game's detail page. Portals copies that game's live release into a new project in the player's My Games, credited as a remix of the original, and opens it in the editor once the copy finishes. Paid games can be remixed only by players who bought them, and mature games only by players who can play mature games.

A remix copies the published files — the same code players already download — along with the genre, device support, age rating, and player support. It never copies the creator's unpublished changes, pricing, thumbnail and gallery, leaderboards, Coin products, collaborators, or GitHub connection. The remix starts as a free, unpublished draft that its new owner edits and publishes like any other game. Games built with the Portals ThreeJS Engine can't be remixed yet. A web game's detail page shows how many times it has been remixed, next to its total plays.

Remixing is on by default for new web games. Games created before remixing existed start with it off, except games published by the Portals team. To change it, open the game's settings in My Games and switch Remixing on or off. Only the owner can change it, and existing remixes are not affected.

Sharing a managed draft playtest

Use the existing get sharable link action in the editor or game settings. For a game with a prepared managed playtest, Share connects its existing /g/<slug>?draft=… URL to the active test for the current staged build. Signed-in link holders join automatically, without an access request or a separate sharing setup step. No publication is needed.

Share keeps the current active test when possible; otherwise it uses the newest active test prepared for that build. If the test ended or the staged build has no prepared test, Share explains what needs preparing instead of handing out a broken multiplayer link. It never extends a test or copies policies to a new build.

The test uses its own saved progress, verified scores and test Coins. Its expiry and 50-participant limit appear in the share dialog. Anyone the link is forwarded to can join. Private invitations and native test builds keep their approval rules.

Ending the test, rotating the draft key or staging a different build stops link-based access. The page displays an unavailable test instead of silently entering an older or public arena. After preparing the new test, use Share again; the existing URL stays the same unless you rotated its key.