r/Devvit • • 7d ago

Help Questions before porting a multiplayer card game to Devvit

Hey all, I am developing a card battler with real-time PvP on my own backend and I'm thinking of bringing it to Reddit. Ideally I would like Reddit players to be able to battle players from other platforms Android, iOS etc.

Before I spend weeks porting, I want to check three things I couldn't find clear answers to in the docs:

1. Own domain for fetch. Redis is per-subreddit, but I need global matchmaking, a server that runs the battles so clients can't cheat, and a persistent economy. My plan is a dedicated subdomain with the Devvit server as a proxy, plus the README justification and ToS/privacy links. Has anyone gotten an exception like this approved?

2. Hashed user IDs. I don't want account linking (SOC2 isn't realistic for me). Players would get standalone accounts, and I'd only send a salted hash of the t2_ ID, never usernames, with a consent prompt and deletion support. Does that still count as linking?

3. Card packs. Packs with random cards and published drop rates. They'd be free and earned through play at launch, and maybe bought with Gold-purchased currency later. Players can trade cards but there's no cash-out. Is that allowed?

Also, has anyone held ~25s long-poll requests through the Devvit server to an external backend? Does that work?

Thanks in advance!

1 Upvotes

2 comments sorted by

View all comments

2

u/Beach-Brews Duck Helper 7d ago

1) Own domain for fetch

You can try to request a domain exception, but it requires a lot of prep work! Generally, according to the HTTP Fetch Policy:

Personal domains (e.g., personaldomain.com) - Will not be approved. If you have a use case that our Devvit server does not support, please submit your request with detailed justification for a possible exception.

However, to "submit your request":

  1. Ensure the domain you request has an API page explaining the APIs the service provides (e.g. /api/v1/ticker/:symbol -> Fetches the market data for a specific company symbol).
  2. Ensure your domain has a clear terms of use + privacy policy
  3. Ensure your app's README has the justification of why a personal domain is needed. What exactly that domain will be used for. Links to the Privacy + Terms + API documentation.
  4. Ensure your app's "Developer Settings" tab contains the URL to your terms + privacy policy.
  5. Submit a mod mail to r/devvit once you have all the necessary documentation.

2) Hashed UserIds

I don't think that is considered "account linking". That rule is more intended for linking a reddit account to an external third-party, such as allowing a user to "sync" their data to a third-party account. For example, if I already have a well-established account on a native iOS app, I could "link" my Reddit account so my progress "off Reddit" is also available on Reddit.

If you "hash" the t2_ so it cannot be obtained directly, and nd you delete that hash if the user deletes their Reddit account, then I do not think it falls under "account linking" exactly. You can always send a mod mail to r/devvit to confirm.

3) Card packs

Totally allowed! Since there is no cash out and the gold is "spent" on in-game items, if a user decides to "trade" cards obtained by spending real money (or not) is up to them. For example: Say a "Card Pack" is 1,500 in-game dollery-doos, and you have an option to "buy" 1,500 dollery-doos for $5 real U.S. cash, that's fair game!

4) Long polling

Devvit has a 30s max execution limit, even if not making a fetch call. Having a long-running request > 15s could cause problems. From your real-time card game perspective, you will probably want to use External Endpoints to send "messages" between a Reddit user and iOS user (for example). It is a "subset" of the Fetch requests, but more intended for this type of use case. You could setup a "managed token" endpoint, send "moves" from the external user to the managed endpoint, and make fetch (or even callback external endpoint) when a Reddit player makes a move. However, this ties back into #1 pretty extensively!


Hope that helps! Okay, time for a nap...

2

u/JUDGE_GAMES_Studio 7d ago

Thank you so much for such detailed info! I will do more research and check out mod mail for further clarification.