|
| 1 | +# Share a Game |
| 2 | + |
| 3 | +*New in 1.57.* Every way of sharing a game made here — a link, an embed on your own site, a pasted link that turns into |
| 4 | +a game, an invite to play together — opens the **play view**: a small player made only for playing. It loads the scene, |
| 5 | +the game's rules, HUD and touch controls, and none of the editor, so a shared game starts noticeably faster, most of all |
| 6 | +on a phone. |
| 7 | + |
| 8 | +<!-- 94-routes: screenshots img/share-a-game/ come from the 94 proof run (client-plugin smoke:play) — re-shoot from the 1.57 preview --> |
| 9 | + |
| 10 | +| You want… | Share | Who can open it | |
| 11 | +|---|---|---| |
| 12 | +| people to play your published game | the **play link** `https://theprototype.app/p/‹id›` | anyone with the link (public and unlisted scenes) | |
| 13 | +| the game on your own site or blog | the **Embed** snippet (an `<iframe>` of `/e/‹id›`) | public scenes | |
| 14 | +| the game to appear when you paste its link | the scene page link `https://theprototype.app/s/‹id›` in a site that reads **oEmbed** | public scenes | |
| 15 | +| friends to play **with you**, right now | the **Play link** from **Invite** | whoever you send it to, while the invite lasts | |
| 16 | + |
| 17 | +## The play link |
| 18 | + |
| 19 | +Publish a scene (**Menu ▸ Publish / Export ▸ Publish**, see [Publish & Export](publish-export.md#publish-the-play-link)) |
| 20 | +and you get its play link, `https://theprototype.app/p/‹id›`, with a **QR code** for a phone or a headset. The |
| 21 | +community page's **▶ Play** button and its **3D preview** open the same play view. |
| 22 | + |
| 23 | +The play view shows a start card with **▶ Play** (and **Enter VR** in a headset's browser), a fullscreen button, the |
| 24 | +*Made with ThePrototype* badge and two links into the full app: |
| 25 | + |
| 26 | +{ .shot width="640" height="360" loading=lazy } |
| 27 | + |
| 28 | +- **Open in theprototype.app ↗** — the same scene in the editor, to look at how it is made. |
| 29 | +- **Remix** — the same scene in the editor as **your copy**: change it, then **Publish** it as a remix (the original |
| 30 | + author is credited on its page). |
| 31 | + |
| 32 | +Playing needs no account. Shared games run on a separate address, `play.theprototype.app`, where your sign-in, your |
| 33 | +autosaves and your AI keys do not exist — whatever a shared scene does, it cannot reach them. So the start card does not |
| 34 | +sign you in; it links to theprototype.app instead (*Sign in on theprototype.app ↗*). Likes work on the scene's page. |
| 35 | + |
| 36 | +## Embed it on your site |
| 37 | + |
| 38 | +**Embed** on a public scene's page (or the **Embed** preset in [Export](publish-export.md#embedding-on-your-own-site)) |
| 39 | +copies an `<iframe>` of `https://theprototype.app/e/‹id›`. It is the same play view, sized by your frame; it asks for |
| 40 | +fullscreen, gamepad, pointer lock and VR access, so all of them work inside the frame. Only **public** scenes embed. |
| 41 | + |
| 42 | +## Paste a link, get a game (oEmbed) |
| 43 | + |
| 44 | +Paste a public scene's page link (`https://theprototype.app/s/‹id›`) into a site that reads **oEmbed** — Notion, |
| 45 | +WordPress, Discourse, Ghost and the sites that use Iframely — and the game plays in place. Developers can call the |
| 46 | +endpoint directly; it answers the same `/e/‹id›` frame: |
| 47 | + |
| 48 | +``` |
| 49 | +https://theprototype.app/oembed?url=https://theprototype.app/s/‹id›&maxwidth=800&maxheight=600 |
| 50 | +``` |
| 51 | + |
| 52 | +Details (sizes, what is accepted) are in [Community ▸ oEmbed](community.md#paste-a-link-get-a-game-oembed). |
| 53 | + |
| 54 | +## Play together from a link |
| 55 | + |
| 56 | +You can invite people straight into the play view of the session you are in — they play with you, without seeing the |
| 57 | +editor: |
| 58 | + |
| 59 | +1. In the editor, open the invite sheet — the robot button **Request AI** on the Connect pill, or **Users ▸ New…** — and pick |
| 60 | + the **Person** tab. |
| 61 | +2. Choose the **Role**, how long the invite lasts and how many people may use it, then **Create invite link**. |
| 62 | +3. Copy the **Play link — opens straight into the game, no editor** and send it. |
| 63 | + |
| 64 | +{ .shot width="440" height="515" loading=lazy } |
| 65 | + |
| 66 | +Everyone who opens it joins your session in the play view and gets the scene from you — it does not need to be |
| 67 | +published. The ordinary **Link** above it still opens the full editor, for people who should build with you. A play |
| 68 | +link of a published game can carry an invite too: `https://theprototype.app/p/‹id›#…` with the part after `#` from the |
| 69 | +invite joins your session on that game's page. |
| 70 | + |
| 71 | +The invite works like every invite: it is checked by your app, it can be **revoked** in **Users**, and the key in it |
| 72 | +(after the `#`) is never sent to a server. |
| 73 | + |
| 74 | +## Limits |
| 75 | + |
| 76 | +- Building tools — the Inspector, the node editor, the AI assistant, Settings — are not in the play view. *Open in |
| 77 | + theprototype.app* or *Remix* opens them. |
| 78 | +- A self-hosted copy of the app has the same play view at `/play`; the community links (`/p/`, `/e/`, oEmbed) belong to |
| 79 | + theprototype.app's community. |
| 80 | +- Old links keep working: `https://theprototype.app/?s=‹id›&play=1&embed=1` still opens the full app with the editor |
| 81 | + hidden. |
0 commit comments