Live data from Hacker News

Ask HN: Advice for Multiplayer Back End

news.ycombinator.com

1–10 of 13 posts

Ask HN: Advice for Multiplayer Back End

#1
Lately I've been yearning to make simple multiplayer Javascript games with as much ease as simple single player games, for the sake of prototyping with friends. I have a sneaking suspicion that for discrete (turns or timers) match-based games, you could have a Firebasey store synchronized between clients and an authoritative server built on top of web sockets, such that the programmer doesn't have to design a new protocol for every game. The reason I don't reach for Firebase immediately is partly due to lock-in/pricing concerns, and because I imagine there would be a simpler tool with the above constraints in mind.

I've stumbled across https://colyseus.io/, but it doesn't look like it quite fits my needs.

Does anyone know of a library out there with the mission of Colyseus, the behavior of Firebase, and simpler than both? Alternatively, has anyone had a pleasant experience building a discrete game with Firebase?

Re: Ask HN: Advice for Multiplayer Back End

#6
I went with Colyseus for my multiplayer bananagrams prototype. It’s not quite the use case, but it did make life easier after figuring out how to model the game with Colyseus’s state mechanics.

Basically you apply game logic on the server to mutate game state, which is automatically synchronized to each client. It’s been a few months and I don’t have the code in front of me, but can give more details later if you’d like.

Re: Ask HN: Advice for Multiplayer Back End

#10
post #9

I'd build it with meteor, mostly because I'm used to it. It's excellent for prototypes and real time by default

There's some lock in in terms of framework specific code but no lock in of your data,it's just a mongo dB. The reliance on mongo means it's always a bit tricky to make join-like calculations, but otherwise I'd really recommend the meteor stack. For hosting as a side project I'd recommend a shared digital Ocean droplet, you'll get much better performance than heroku. Use "meteor up" to deploy. It will be 5usd per month but you can host many small apps on one droplet
Post reply on HN