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
- The game has no outside network access.
fetch, WebSocket, and WebRTC to other servers fail, soPortals.netandPortals.voiceare the only transports. 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 Guardian avatar in a Three.js game | Guardian 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.
