Skip to content

Commit 7c0d76b

Browse files
committed
Merge remote-tracking branch 'origin/feat/94-routes' into feat/94-int-docs
2 parents 8dfc8b0 + 44a1f81 commit 7c0d76b

6 files changed

Lines changed: 90 additions & 5 deletions

File tree

‎docs/community.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,11 +84,12 @@ A scene link is `https://theprototype.app/?s=‹id›`, and the app treats it li
8484
### Embedding a scene
8585

8686
**Embed** on a public scene's page copies an `<iframe>` snippet for your own site or blog. The frame shows
87-
`/e/‹id›`, which opens the app with the scene already playing and with **no editor around it**: no menus, panels or
88-
toasts — just the viewport, the game's HUD and the touch controls. A small corner link, *Open in theprototype.app ↗*,
89-
opens the same scene in the full app in a new tab, and a ▶ button re-enters play after <kbd>Esc</kbd>.
87+
`/e/‹id›`, which opens the **play view** (*1.57*) with the scene already playing and **no editor in it**: no menus, panels or
88+
toasts — just the viewport, the game's HUD and the touch controls. Corner links, *Open in theprototype.app ↗* and
89+
*Remix*, open the same scene in the full app in a new tab, and a ▶ button re-enters play after <kbd>Esc</kbd>. Every
90+
way to share a game is on one page: [Share a Game](share-a-game.md).
9091

91-
The same player is available on any scene link by adding **`&embed=1`**: `https://theprototype.app/?s=‹id›&play=1&embed=1`.
92+
The full app can still hide its editor on any scene link with **`&embed=1`**: `https://theprototype.app/?s=‹id›&play=1&embed=1`.
9293
The flag lasts for the life of the page.
9394

9495
#### Paste a link, get a game (oEmbed)
19.8 KB
Loading
18.1 KB
Loading

‎docs/publish-export.md‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,9 @@ A play link, an embed and an exported game all open the same **player**:
3232
**Enter VR** — with the hint *Click to look around · Esc to pause*. The click is needed: a browser only locks the
3333
pointer, goes fullscreen or enters VR after a real click.
3434
- A **fullscreen** button sits in the bottom-left corner where the page may go fullscreen.
35-
- A play link or embed also has *Open in theprototype.app ↗*, which opens the same scene in the full editor.
35+
- A play link or embed also has *Open in theprototype.app ↗*, which opens the same scene in the full editor, and
36+
*Remix*, which opens it as your copy (*1.57*). Since 1.57 play links and embeds open the slim **play view** — see
37+
[Share a Game](share-a-game.md).
3638
- The **Made with ThePrototype** badge — a small, semi-transparent TP logo with solid dark-grey accents, so a game's colours never tint it — sits in the bottom-right corner; hovering
3739
shows *Made with ThePrototype*, clicking opens theprototype.app in a new tab. It moves up out of the way of a game's
3840
touch buttons and is not drawn inside a VR headset.

‎docs/share-a-game.md‎

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
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+
![The play view's start card over the scene: Play, Accessibility, the hint Click to look around · Esc to pause, and Sign in on theprototype.app with Playing needs no account under it; along the bottom the fullscreen button, Open in theprototype.app and Remix.](img/share-a-game/play-start-card.webp){ .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+
![The Invite to this session sheet on its Person tab: Up to 5 people · expires in 30 min · View, then three fields with Copy buttons — Link, Play link — opens straight into the game, no editor, and For a chat.](img/share-a-game/invite-play-link.webp){ .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.

‎mkdocs.yml‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ nav:
217217
- Community:
218218
- Publish, Play, Remix: community.md
219219
- Publish & Export: publish-export.md
220+
- Share a Game: share-a-game.md
220221
- VR:
221222
- VR Guide: vr.md
222223
- Building in VR: building-in-vr.md

0 commit comments

Comments
 (0)