Skip to content
This repository was archived by the owner on Sep 17, 2024. It is now read-only.

Commit 04681ce

Browse files
committed
chore: update lobbies docs
1 parent 4295040 commit 04681ce

File tree

19 files changed

+997
-40
lines changed

19 files changed

+997
-40
lines changed

modules/auth_oauth/module.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Social Authentication Provider",
3+
"description": "Authenticate users with OAuth 2.0.",
4+
"icon": "key",
5+
"tags": [
6+
"core",
7+
"user",
8+
"auth"
9+
],
10+
"authors": [
11+
"rivet-gg"
12+
],
13+
"status": "coming_soon",
14+
"dependencies": {},
15+
"errors": {}
16+
}
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
# Discord Activities
2+
3+
Integrate your Rivet game with [Discord Activities](https://discord.com/developers/docs/activities/overview).
4+
5+
<Steps>
6+
<Step title="Set up Discord SDK">
7+
Set up the Discord SDK ([docs](https://discord.com/developers/docs/activities/building-an-activity#step-3-installing-the-embedded-app-sdk)):
8+
9+
```js
10+
// Import the SDK
11+
import { DiscordSDK } from "@discord/embedded-app-sdk";
12+
13+
// Instantiate the SDK
14+
const discordSdk = new DiscordSDK(process.env.DISCORD_CLIENT_ID);
15+
16+
setupDiscordSdk().then(() => {
17+
console.log("Discord SDK is ready");
18+
});
19+
20+
async function setupDiscordSdk() {
21+
await discordSdk.ready();
22+
}
23+
```
24+
</Step>
25+
26+
<Step title="Update lobbies code">
27+
Update your Rivet matchmaking code to include tags:
28+
```js
29+
const res = await backend.lobbies.findOrCreate({
30+
tags: {
31+
// Discord SDK set up in previous step
32+
instanceId: discordSdk.instanceId,
33+
},
34+
// ...
35+
});
36+
```
37+
</Step>
38+
39+
<Step title="Set up route mapping">
40+
After following the [activity tutorial](https://discord.com/developers/docs/activities/building-an-activity), access the [URL mapping](https://discord.com/developers/docs/activities/development-guides#url-mapping) for your Discord app and configure it like so:
41+
42+
| Prefix | Target |
43+
|--------|--------|
44+
| /gstatic | fonts.gstatic.com/ |
45+
| /ws | lobby.rivet.run/ |
46+
| /api | api.rivet.gg/ |
47+
| / | asteroids-xxx.rivet.game/ |
48+
49+
<Note>
50+
The URL used for the "Root Mapping" will be printed in the console when you deploy to Rivet via `rivet deploy`.
51+
</Note>
52+
</Step>
53+
54+
<Step title="Run activity">
55+
Run activity (read docs [here](https://discord.com/developers/docs/activities/building-an-activity#step-4-running-your-app-locally-in-discord))
56+
</Step>
57+
</Steps>
58+
59+
## Example repo
60+
61+
A fully integrated example can be found [here](https://github.com/rivet-gg/discord-embedded-app-sdk/tree/main/examples/asteroids-rivet). (This is using a slightly dated API, but is lagely identical.)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "Discord Activities",
3+
"description": "Activities are a way to enjoy shared experiences with friends, such as games and media, on Discord itself. ",
4+
"icon": "discord",
5+
"tags": ["platform", "integration"],
6+
"authors": ["discord", "rivet-gg"],
7+
"status": "coming_soon",
8+
"scripts": {},
9+
"errors": {}
10+
}

modules/eos/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Epic Online Services
2+
3+
See [Epic Online Services](https://dev.epicgames.com/docs/en-US/api-ref) for more details.

modules/eos/module.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "Epic Online Services",
3+
"description": "Epic Online Services (EOS) is a cross-platform SDK that provides essential online services such as authentication, friends, matchmaking, and more for games.",
4+
"icon": "e",
5+
"tags": ["platform", "integration"],
6+
"authors": ["rivet-gg"],
7+
"status": "coming_soon",
8+
"scripts": {},
9+
"errors": {}
10+
}

modules/idem/README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Idem
2+
3+
See [IDEM](https://www.idem.gg/) for more details.

modules/idem/module.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "IDEM",
3+
"description": "Matchmaking for multi-player games – as an API. Be sure your game's matchmaking will be loved by players.",
4+
"icon": "i",
5+
"tags": ["service", "integration"],
6+
"authors": ["idem-matchmaking"],
7+
"status": "coming_soon",
8+
"scripts": {},
9+
"errors": {}
10+
}

modules/infisical/README.mdx

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Infisical
2+
3+
[Infisical](https://infisical.com/) is an easy to use tool for managing secrets. This is helpful for when dealing with API keys in development.
4+
5+
<Steps>
6+
<Step title="Install Infisical">
7+
[Documentation](https://infisical.com/docs/cli/overview)
8+
</Step>
9+
<Step title="Login">
10+
```sh
11+
infisical login
12+
```
13+
</Step>
14+
<Step title="Populate environment variables">
15+
[Documentation](https://infisical.com/docs/documentation/platform/project#secrets)
16+
</Step>
17+
<Step title="Run dev server with Infisical">
18+
```sh
19+
infisical run -- opengb dev
20+
```
21+
</Step>
22+
</Steps>

modules/infisical/module.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "Infisical",
3+
"description": "All-in-one platform to securely manage application configuration and secrets across your team and infrastructure.",
4+
"icon": "infinity",
5+
"tags": ["security", "integration"],
6+
"authors": ["infisical", "rivet-gg"],
7+
"status": "stable",
8+
"scripts": {},
9+
"errors": {}
10+
}

0 commit comments

Comments
 (0)