Dashboard guide
Files
Files gives a game somewhere to keep data online: save games, replays, level packs, screenshots, what have you. Files live in buckets, and each bucket holds a tree of folders.
Neither your game nor your server sends file contents through the Scoreboat API. A game wishing to upload or download a file will ask Scoreboat for a short lived link to the actual file storage service. The client will then upload or download the bytes directly from that link.
Buckets
Open Files in a game's menu and add a bucket by name. A game can have several, such as one for saves and one for shared levels. The bucket's page shows its id, which is what a game passes, how full it is, and its limits.
Currently, because I am just doing this for fun and this is a very rough minimum viable product, I've kept the enforced limits quite low.
Limits
Every bucket has limits, which you can lower or raise up to a ceiling. A player who reaches their own limit cannot add more until they remove something, and nobody can add anything once the bucket is full.
| Limit | Default for a new bucket | Most allowed |
|---|---|---|
| Storage in the bucket | 1.0 GB | 5.0 GB |
| Files in the bucket | 10,000 | 100,000 |
| Storage per player | 50.0 MB | 5.0 GB |
| Files per player | 100 | 100,000 |
| Downloads per month | 10.0 GB | 100.0 GB |
| One file | 10.0 MB | |
| Folders in a bucket | 10,000 | |
| Buckets in a game | 20 | |
| Storage across all your buckets | 20.0 GB |
The monthly download limit is the ceiling on what the bucket can cost you. Once it is reached, download links are refused until the next month.
Folder rules
What a game may do in a folder is decided by that folder's rules. A new bucket starts locked: nothing is open to a game until you open it. Browse to a folder and set Who may do what for each action:
| Rule | Shown as |
|---|---|
list_dirs |
List folders |
list_files |
List files |
read |
Read files |
create |
Create files |
overwrite |
Overwrite files |
delete |
Delete files |
mkdir |
Create folders |
Each action is open to a level of caller:
| Level | Shown as | Who |
|---|---|---|
anyone |
Anyone | Any caller whose key reaches the bucket, signed in or not. |
player |
Any signed-in player | Any signed-in player of the bucket's game. A guest counts. |
creator |
The creator | The player who made the file (or, for listing and adding, the folder). |
admin |
Admin keys only | Only a key holding the bucket's admin action. |
Each folder has two sets of rules: In this folder, and In folders made inside it, which a new subfolder starts with. You can also apply new rules to every folder already under this one.
Keys holding the bucket's admin action are let through every rule, so such a key belongs only on your own
server.
Potential setups
- Private save files. In
/saves/: Create files open to any signed-in player, and List files, Read files, Overwrite files and Delete files for the creator. Each player sees and touches only their own files. - Shared level uploads. In
/levels/: List files and Read files for anyone, Create files for any signed-in player, Overwrite and Delete for the creator. - Content you publish. Upload from the dashboard, and open only List files and Read files to anyone.
Clearing out
From a folder's page you can delete everything one player has put in the bucket, by their player id, or delete a folder and everything in it.
What a game needs
A key with the game client role reaches every bucket of the game, and then the folder rules decide. See the file API.