Skip to content
This repository has been archived by the owner on Dec 13, 2024. It is now read-only.

Commit

Permalink
WIP fixing links
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanFlurry committed Jun 29, 2023
1 parent 44ba334 commit 83b544c
Show file tree
Hide file tree
Showing 9 changed files with 23 additions and 34 deletions.
5 changes: 5 additions & 0 deletions linkinator.config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"recurse": true,
"markdown": true,
"skip": "https://hub.rivet.gg,https://twitter.com,https://www.cloudflare.com,https://cloudflare.com,https://github.com,https://support.cloudflare.com"
}
2 changes: 1 addition & 1 deletion lychee.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,5 @@ exclude = [
# Bug parsing `src={xxxx}`
'%7B.*%7D$'
]
exclude_all_private = true
# exclude_all_private = true
exclude_mail = true
5 changes: 4 additions & 1 deletion scripts/checkBrokenLinks.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
#!/bin/sh
set -euf -o pipefail

docker run --init -it -v `pwd`:/input lycheeverse/lychee --config /input/lychee.toml --base /input/src/pages '/input/src/pages/**/*.mdx'
# docker run --init -it -v `pwd`:/input lycheeverse/lychee --config /input/lychee.toml --base /input/src/pages '/input/src/pages/**/*.mdx'
# muffet --verbose --max-connections=16 --exclude='(hub.rivet.gg|tanks.rivet.game|discord.gg|twitter.com|github.com|cdn-cgi)' https://staging.rivet.gg

npx linkinator --config linkinator.config.json https://c4594a48.site-ckd.pages.dev/
2 changes: 1 addition & 1 deletion src/pages/docs/general/concepts/dev-tokens.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Ideally, each developer generates a token for their local development. The token

In some cases, there's no way to return a valid response when developing on your local machine.

For example, the [`matchmaker.lobbies.find`](/docs/matchmaker/api/post-lobbies-find) endpoint will mock a fake address pointing to your local development server. It will also return a [development player token](/docs/general/concepts/token-types#matchmaker-development-player) that act as a real [player token](/docs/general/concepts/token-types#matchmaker-player).
For example, the [`matchmaker.lobbies.find`](/docs/matchmaker/api/lobbies/find) endpoint will mock a fake address pointing to your local development server. It will also return a [development player token](/docs/general/concepts/token-types#matchmaker-development-player) that act as a real [player token](/docs/general/concepts/token-types#matchmaker-player).

## Store your token in a `.env` file

Expand Down
10 changes: 5 additions & 5 deletions src/pages/docs/matchmaker/concepts/finding-lobby.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { TutorialReplit } from '@/components/TutorialReplit';

# How the matchmaker chooses lobbies

This document explains the logic going on behind the scenes when a game calls [`Lobbies.find`](/docs/matchmaker/api/post-lobbies-find).
This document explains the logic going on behind the scenes when a game calls [`Lobbies.find`](/docs/matchmaker/api/lobbies/find).

## TL;DR

Expand All @@ -14,7 +14,7 @@ If you're looking to build competitive matchmaking on top of Rivet, please read

## Determining the region

If no region is specificed in [`Lobbies.find`](/docs/matchmaker/api/post-lobbies-find), Rivet will use the GeoIP location provided by Cloudflare to find the nearest datacenter.
If no region is specificed in [`Lobbies.find`](/docs/matchmaker/api/lobbies/find), Rivet will use the GeoIP location provided by Cloudflare to find the nearest datacenter.

GeoIP does not always provide the most optimal route to the datacenter, so we recommend providing the user with the ability to select their own region.

Expand All @@ -28,15 +28,15 @@ This simplified exampe demonstrates how the matchmaker finds the correct lobby t

## Providing multiple game modes

[`Lobbies.find`](/docs/matchmaker/api/post-lobbies-find) allows the developer to provide multiple game modes to join. In this case, Rivet Matchmaker will select the optimal lobby from all of the provided game modes.
[`Lobbies.find`](/docs/matchmaker/api/lobbies/find) allows the developer to provide multiple game modes to join. In this case, Rivet Matchmaker will select the optimal lobby from all of the provided game modes.

This can be helpful for games with low traffic but still want to provide multiple game modes to their users. In this situation, new players will be connected to any lobby for any game mode with players in it.

## Full lobbies & no lobbies running

When all of the lobbies are full or there are no lobbies running, Rivet Matchmaker will automatically create a new lobby for the game mode specified and connect the player to that lobby.

If this is not the desired behavior, [`Lobbies.find`](/docs/matchmaker/api/post-lobbies-find) can be called with `prevent_auto_create_lobby` as `true`. This will return a [`MATCHMAKER_NO_AVAILABLE_LOBBIES`](/errors/mm/no-available-lobbies) error when no lobby can accept players.
If this is not the desired behavior, [`Lobbies.find`](/docs/matchmaker/api/lobbies/find) can be called with `prevent_auto_create_lobby` as `true`. This will return a [`MATCHMAKER_NO_AVAILABLE_LOBBIES`](/errors/mm/no-available-lobbies) error when no lobby can accept players.

Also see [idle lobbies](/docs/matchmaker/concepts/idle-lobbies).

Expand Down Expand Up @@ -64,4 +64,4 @@ Take our example at 10 PM where there are **5 lobbies** with **2 players in each

In our example, we still have 4 lobbies with only 2 players online.

We recommend prompting players to find a new lobby when the lobby is almost empty. By having the players in these empty lobbies call [`Lobbies.find`](/docs/matchmaker/api/post-lobbies-find) again, the players will be compacted in fewer, fuller lobbies.
We recommend prompting players to find a new lobby when the lobby is almost empty. By having the players in these empty lobbies call [`Lobbies.find`](/docs/matchmaker/api/lobbies/find) again, the players will be compacted in fewer, fuller lobbies.
4 changes: 2 additions & 2 deletions src/pages/docs/matchmaker/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ The Rivet Matchmaker is a casual matchmaker optimized to get your player connect

To integrate the Rivet matchmaker, your game needs to call these three endpoints:

- **[matchmaker.lobbies.find](/docs/matchmaker/api/post-lobbies-find)**: Called on the game client to return the address to connect to & the player token
- **[matchmaker.lobbies.find](/docs/matchmaker/api/lobbies/find)**: Called on the game client to return the address to connect to & the player token
- **[matchmaker.players.connected](/docs/matchmaker/api/post-players-connected)**: Called on the game server to notify the matchmaker the player connected & verify the player token
- **[matchmaker.players.disconnected](/docs/matchmaker/api/post-players-disconnected)**: Called on the game server to notify the matchmaker the player disconnected

Expand All @@ -24,7 +24,7 @@ The Rivet Matchmaker is tightly integrated with Serverless Lobbies to automatica
href='/docs/matchmaker/concepts/finding-lobby'
/>
<Resource title='Lobby environment variables' icon={faList} href='/docs/matchmaker/concepts/lobby-env' />
<Resource title='matchmaker.lobbies.find' icon={faCode} href='/docs/matchmaker/api/post-lobbies-find' />
<Resource title='matchmaker.lobbies.find' icon={faCode} href='/docs/matchmaker/api/lobbies/find' />
<Resource
title='matchmaker.players.connected'
icon={faCode}
Expand Down
2 changes: 1 addition & 1 deletion src/pages/docs/serverless-lobbies/concepts/ports.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ By default, Rivet uses [Rivet Game Guard](/docs/serverless-lobbies/concepts/game

## Connecting to your game

When [finding a lobby](/docs/matchmaker/api/post-lobbies-find), Rivet returns map of `ports` with the address and port to connect to.
When [finding a lobby](/docs/matchmaker/api/lobbies/find), Rivet returns map of `ports` with the address and port to connect to.

Unless using host networking, there is no static IP address and port exposed for players to connect to your game.

Expand Down
8 changes: 4 additions & 4 deletions src/pages/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -632,11 +632,11 @@ function UpAndRunning() {
title='Video learn'
icon={faServer}
iconType='duotone'
href='/docs/serverless-lobbies/index'
href='/docs/serverless-lobbies'
/>
<Resource title='API' icon={faGlobe} href='/docs/cdn/index' />
<Resource title='GitHub' icon={faGlobe} href='/docs/cdn/index' />
<Resource title='Community' icon={faUserGroup} href='/docs/cdn/index' />
<Resource title='API' icon={faGlobe} href='/docs/cdn' />
<Resource title='GitHub' icon={faGlobe} href='/docs/cdn' />
<Resource title='Community' icon={faUserGroup} href='/docs/cdn' />
</div>
</div>
</div>
Expand Down
19 changes: 0 additions & 19 deletions src/pages/learn/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,8 @@ import { HeroPattern } from '@/components/HeroPattern';

<HeroPattern />

export const description = 'Learn';

export const sections = [{ title: 'Guides', id: 'guides' }];

# Learn

Use the Protocol API to access contacts, conversations, group messages, and more and seamlessly integrate your product into the workflows of dozens of devoted Protocol users. {{ className: 'lead' }}

<div className='not-prose mb-16 mt-6 flex gap-3'>
<Button href='/quickstart' arrow='right' children='Quickstart' />
<Button href='/sdks' variant='outline' children='Explore SDKs' />
</div>

## Getting started {{ anchor: false }}

To get started, create a new application in your [developer settings](#), then read about how to make requests for the resources you need to access using our HTTP APIs or dedicated client SDKs. When your integration is ready to go live, publish it to our [integrations directory](#) to reach the Protocol community. {{ className: 'lead' }}

<ButtonGroup className='not-prose'>
<Button href='/sdks' arrow='right' children='Get your API key' />
</ButtonGroup>

<ResourceGroup>
<Resource title='5 Minute Crash Course' icon={faBooks} href='/docs/general/guides/crash-course' />
<Resource title='Libraries' icon={faBooks} href='/docs/general/libraries' />
Expand Down

0 comments on commit 83b544c

Please sign in to comment.