Sharing a backend across multiple games
Motivation
It's common for studios to have multiple games and want to share backend data across them. For example, a studio might want to share user accounts & friends across games, but keep game-specific data like leaderboards & achievements separate.
Multiple module instances
If we have a leaderboard
module and we want to run multiple instances of it for the games foo
and bar
, we can use module aliases to create multiple instances of the module.
rivet.json
This will create an isolated database for each game's leaderboard.
To get the scores from the foo
leaderboard, we can use the foo_leaderboard
module:
TypeScript