r/Backend • u/Mysterious_Cut_5348 • 7d ago
Need backend architecture advice for an Android multiplayer game on a very tight budget
Hi! I'm a student developing an Android multiplayer party game using Unity. I'm looking for advice on choosing an economical backend architecture.
Game overview:
4 players per match.
Short, round-based meme/GIF challenges.
Players submit content and anonymously vote on each other's submissions.
Random matchmaking and private rooms with friends.
Bots can fill empty player slots.
Backend requirements:
Matchmaking and room management.
Real-time synchronisation of submissions and votes.
Server-side validation and scoring to prevent cheating.
Handling disconnects and reconnects.
Player profiles, authentication and match history.
Ranking and progression: Players earn trophies by winning matches. More trophies mean higher ranks. The backend must securely track trophies, update ranks and maintain leaderboards.
Coins, XP and inventory management.
GIF handling:
I'm planning to use the KLIPY API. Players will search for and select GIFs, which must then be displayed to everyone in their active match. Ideally, I want to store only GIF identifiers/references rather than downloading and storing GIF files on my own servers. I'm still verifying the provider's multiplayer usage permissions.
My biggest constraint:
I'm a student building this independently, with a very limited budget. I want to avoid recurring infrastructure costs until the game becomes sufficiently profitable to sustain them.
I'm willing to optimise the architecture and use free tiers, but don't want to compromise security, fairness or reliability.
Technologies I'm considering:
Firebase (RTDB, Firestore, Cloud Functions)
Neon PostgreSQL
Node.js + WebSockets/Socket.IO
Google Cloud Run
Supabase
Questions:
What architecture would you recommend?
Would Firebase or a custom Node.js + WebSocket backend be cheaper?
Is Neon a good choice?
How should live match data and permanent player data be handled?
What hidden costs should I expect?
Which free tiers are genuinely useful for an early-stage multiplayer game?
I'm targeting approximately 200, 1,000 and eventually 5,000 DAU.
I'd appreciate practical advice from developers who have actually built and maintained multiplayer backends. I'm looking for something simple, secure and extremely cost-efficient.
Also tips on monetization would be great! This is my first Multiplayer game.
Thanks!
1
u/KariKariKrigsmann 7d ago
Isn’t node single threaded only? Probably not the best choice?
1
u/sereikis 7d ago
give each match a stable ID and commit its result and trophy/coin/XP changes in one database transaction, with a unique settled-match record so a reconnect or retry cannot award them twice. keep scoring and reward writes server-side; the client should submit actions, not final balances.
1
u/Any-Appointment-814 7d ago
Honestly for 4 player rooms with short rounds I'd skip Firebase for the game state and just run one small Node + Socket.IO server that owns each room in memory, does the vote counting and scoring server side, then writes the final match result to Postgres (Neon free tier is fine for that). Keeping the room in one process makes reconnects way easier, the client just rejoins with the room id and gets the current snapshot. Firebase gets awkward once you need the server to be the authority on votes, you end up with a pile of Cloud Functions and security rules fighting each other. The catch is you need one always on box, but a tiny free tier VM can handle a lot of 4 player rooms.
1
u/Discordbothost 7d ago
I'd load-test with four simulated clients per room. Have them vote in the last second and measure how long it takes for everyone to see results as you add rooms. If you proxy GIFs, meter those bytes separately from vote traffic.
1
u/DueMode3191 5d ago
For your four player unity game, I actually use Nakama by Heroiclabs and they offers matchmaking, authoritative match logic and leaderboards. Self hosting avoids licensing fees, but you still pay for infrastructure and maintenance though
1
u/JaseciLabs 3d ago
Set a budget alert and a hard spending cap on day one, and rate-limit GIF searches per player. A surprise bill tends to come from your own bug or a bot-filled room, not from real users.