Skip to content

Latest commit

 

History

History
37 lines (31 loc) · 7.34 KB

features.md

File metadata and controls

37 lines (31 loc) · 7.34 KB

What the cloud does

Everything in the cloud API works and is tested end to end. The API may still change while the version is 0.

Service What players get State
Accounts Sign-in without a password: a code by e-mail, then a refresh token per device that changes on every use. Export and deletion of all data. works
Friends and blocks Requests by handle, mutual requests become friends at once, blocks stay private. works
Presence Who is online, what they play, and whether their game is open to join. works
Sessions Create, join and leave, with capacity, a leader, opaque game properties and a version guard: only the same game version and AnyPS5 build play together. works
Play Together A session of kind lan for games that find others on a local network: the launcher opens it, friends join it, and it ends when its host leaves. Presence and invitations say so. works
Invitations Invite friends into a session; the invitation ends with the session. works
Join codes A short code that stands for a player and lets someone who is not a friend, a Discord friend for example, ask to join the game the player offers. Redeeming one makes an ordinary invitation, and nothing joins by itself. The cloud keeps only a hash of the code; a code lives 2 hours by default (join_code_minutes), and a player has one at a time. works
Share play A host streams the game they run to one member of their party, who watches, takes over their pad or plays beside them. The cloud keeps only the record (who, which title, mode, path, endpoints) and sends the invitation and the events; no picture, sound or pad state passes through it. An invitation lives 60 seconds, a host may start 10 shares an hour, and a share ends when either side stops it, the host's game ends, either leaves the party, a block or ban comes between them, either has no event connection for 60 seconds, or the host's relayed minutes for the day (share_relay_minutes_per_day) are used. Off by default (share_enabled, env ANYPLAY_CLOUD_SHARE_ENABLED). works, off by default
Leaderboards Boards of best scores, one per title and board ID the game passes, for every game the same way. An account keeps its best score on a board; reads give the top, the lines around the player and the player's friends, with ranks counted among what the viewer may see. Scores are shown to friends unless the player chooses everyone or nobody; blocks hide both ways; a moderator can set a board's order and bounds, close it and remove or restore an entry. 60 scores per account per 10 minutes, 64 boards per title, 16 made per account. A read-only board page on the web. Off by default (leaderboards_enabled). works, off by default
Trophies Records of earned trophies (title, number, grade, time; no names or art), rarity once 10 players own a title, gamer cards with counts by grade. Private by default: friends see them, and each player can show them to everyone or nobody. works
Profiles A short text (160 characters, no links), up to 3 favourite titles, an avatar and playtime per title, each with its own visibility (friends by default, everyone or nobody). Avatars are PNG or JPEG up to 1 MB, decoded with limits against decompression bombs, cropped square, scaled to 256 by 256 and stored again as PNG without metadata, in the database, served by content hash with long cache headers; 5 uploads per account and hour. Playtime keeps the highest minutes seen per title and day, so uploads can repeat. works
Profile page and feed GET /v1/accounts/{id}/profile also answers the trophy counts and the connections the caller may see. The feed lists the player's own and their friends' recent trophies (with grade and rarity), new friends, first plays of a game and parties (only members see those), newest first and paged. Items hold numbers and kinds, never names or text. Four fixed reactions, one per account and item, no comments. Visibility is the player's feed setting (friends by default; nobody also stops recording). At most 100 items per account and day, kept 90 days (feed_retention_days); 60 reactions per account and minute. works
Played with recently A list, private to the player, of the people they were in the same party or session with for at least 2 minutes. Each entry holds the other account, the time of the last meeting and the title. Entries are kept 30 days, at most 50 people per account; a block hides an entry both ways. The player can clear the list or stop it from remembering (GET/DELETE /v1/me/played-with, GET/PUT /v1/me/played-with/remember, and the same on the account web). The other person is never told. works
Relays Signed tickets that let one endpoint use one relay for 24 hours. Relays check them offline and never call the cloud. works
Moderation Reports, bans per account and e-mail address, rate limits on every route, and an admin command line. works
Parties and messages Parties with a leader and members, and text messages in one-to-one and group conversations. A message from someone who is not a friend waits in the receiver's message requests. Voice and calls run between players, not through the cloud. works
Find Players Listings that look for people to play a game with. A listing lives for an hour; other players ask to join, and the poster accepts or declines. works
Screenshots and clips A screenshot (up to 10 MB) or a clip (up to 100 MB, 60 seconds) sent to a friend. The cloud keeps the file for 30 days and then deletes it (disk and backups). works
Voice signalling A party member announces a voice endpoint and relay, and the other members read it with the party. The audio runs between players, not through the cloud. works
Matchmaking, leaderboards, save backups planned

How it is built

  • Requests and events. The net service calls a small JSON API over HTTPS and holds one WebSocket that pushes events: a friend's presence, an invitation, a change in a session. Events are short, and the client reads the full state after each reconnect, so a lost event never leaves it wrong.
  • Tokens. The cloud signs its own tokens with Ed25519 (crates/ticket): access tokens that live 15 minutes, and relay tickets bound to one endpoint. A refresh token used twice signs the device out, because only a thief would do that.
  • Relays. iroh relays carry encrypted QUIC traffic between players and cannot read it. anyplay-relay admits an endpoint only with a ticket the cloud signed for it.
  • One program, two shapes. Self-hosters run one process with a SQLite file. The same program can run on many nodes with PostgreSQL and NATS, and the same tests run on both (ADR 0002). The cloud at anyplaynet.com is one node today; the road to a cluster is in ARCHITECTURE.md.

What the cloud never does

It never sees game files, never contacts a platform holder's servers and never stands in for a publisher service that still runs. The line is drawn at the law explains where the network's line lies. Revival servers for services a publisher has shut down are allowed and not built yet.