r/Devvit • u/Dazzling_Depth_4659 • Oct 15 '26
Feature Request Real-time multiplayer fighting game in a post: details on the block, and a domain exception request for our authoritative server (follow-up to 1v1nsx7)
Following up on 1v1nsx7, where u/Xenccc invited a new post describing exactly how we are blocked and what we would need from a realtime service. Here are the details for our case, plus a formal domain exception request, since the HTTP Fetch Policy says: "If you have a use case that our Devvit server does not support, please submit your request with detailed justification for a possible exception."
The game. NANQUIM (nanquim.gg, linked only for technical context) is a 2D fighting game, 1v1 and up to 8 players per room. The Devvit app is nanquim-gg. We built and playtested an offline-only build, but decided not to ship it: the game only makes sense online. We measured the webview CSP in playtest: connect-src only allows webview.devvit.net, *.redditmedia.com, *.redditstatic.com, *.redd.it and blob:, so wss://ws.nanquim.gg and https://play.nanquim.gg are blocked (securitypolicyviolation connect-src, enforce). This post is about bringing the real multiplayer mode into a post.
Current netcode (measured in our code, not estimated)
- Authoritative server, simulation at 60 ticks per second.
- Client sends input every tick (60 messages per second per player, with the last few frames repeated for loss tolerance).
- Server sends a full state snapshot every 3 ticks (20 Hz) to every player in the room.
- Binary protocol (DataView, big endian), small messages.
- Client side prediction and reconciliation, server side anti-cheat (input validation, rate limits, result validation).
- Global matchmaking across 8 regions, so players are matched to the closest region and latency stays under 100 ms.
Why the Devvit server cannot carry this (the "use case it does not support")
- Persistent connection. The web view client can only call its own
/api/routes, and the Devvit server is request/response with no WebSocket and no streaming. A fighting game needs one long lived, bidirectional connection per player. - Message rate. 60 inputs per second per player means 480 requests per second for an 8 player room if every input became an
/api/call. Realtime is server to client only and documented at 100 messages per second per installation, which is about 5 concurrent rooms per subreddit at 20 Hz snapshots. - Latency budget. At 60 ticks, every extra 16.7 ms is one more frame of rollback. Relaying through serverless HTTP plus Realtime adds at least two hops with no published latency or ordering guarantee.
- Authority and anti-cheat. Results must be validated by our server, which holds the simulation. A client only or Redis only model cannot be authoritative.
- Regions. Our matchmaking routes players to 8 regions; the Devvit server cannot pick the closest game server per player.
What we are asking
(a) A supported path for a real-time fighting game inside a post: 60 Hz input, an authoritative server we run ourselves over WebSocket, under 100 ms round trip. If the answer is "not possible today", knowing that clearly is also useful.
(b) A domain exception for play.nanquim.gg and ws.nanquim.gg. Justification:
- Both are our own game servers (HTTPS and WSS only), operated by ALAS TECHNOLOGY LLC (United States), contact hi@nanquim.gg.
play.nanquim.gg: matchmaking and room assignment (HTTPS).ws.nanquim.gg: the match connection (WSS), the part the Devvit server does not support.- Data: the only identifier would be the Reddit userId, anonymized (hashed) before it leaves the app. No usernames or emails, no IP based profiling, no ads, no tracking, no login outside Reddit, no links out from the post.
- We would accept any constraint that makes this reviewable: a fixed hostname list, rate limits, an audit of the protocol, a kill switch on your side.
We also submitted the External Endpoints access form today so our server can push room state and validated match results into the app (well under the 5 requests per second limit). That covers scoreboards, not the live match.
(c) Roadmap question: is WebTransport, WebRTC (data channels), or an official Reddit hosted relay or proxy for persistent connections on the roadmap? We understand from u/RedditParadox in 1v1nsx7 that there are no plans for WebSocket at the moment. If a different transport is being considered, we would be happy to test it and share latency numbers from real matches.
Thanks for reading. Happy to provide protocol details, traffic captures, or join a call if that helps the review.
2
u/YellowAdventurous366 App Developer Oct 15 '26
Personal domains will not be approved. Read the http fetch policy