I host https://babbl.xyz on DO with a single $10 server for the socket and the web, and a $10 server for mysql. This can support around 500 active players.
I also did a more action asteroids clone (http://triangle-wars.com), and this would only support I guess 50 players on a $10 server.
The limiting factor seems to be the number of packets / sec that need to be broadcast to all players. If each player is changing state 2/sec, and you have 50 players, then the sever needs to relay 100 packets/sec...
Unlike some other comments in this thread, I didn't find JSON parsing to have any effect on performance.
Thanks for the info. Good thing about turn-based games is that you send small packets to few players every few seconds, so they're not that intensive in memory/transfer. I hope having a thousand players in a room won't break my piggy bank. Later on I'll venture with chess, checkers and backgammon, all turn-based games.
In this oldie of mine [1][2][3], I used protobuf (with no dictionary), and basically only used real-time information to show other player make moves, in otherwise turn-based/async profile game. It's currently solely on single $20 DO droplet, so I hope no HN effect kicks-in. :)
I tried playing that game but it's almost unplayable on my machine. The input lag seems to be around 200-250ms (so there seems to be no client prediction). Is this how was it supposed to be? Also it's not nice that you didn't mention the demo contains a crypto miner...
I work on it most of this afternoon, including now. Maybe you hit it at wrong time. I use it a lot for load testing, that's mostly why it's live. It did came with a WARNING. :/ Works like a butter for me on EU <-> US path.
> Also it's not nice that you didn't mention the demo contains a crypto miner...
Hopefully it turned on only for Desktop + Chrome and didn't drain your battery? I simply didn't think it'd come as surprise, considering context of the discussion.
The bottleneck likely isn't the server here, but geolocation. He has 3 Digital Ocean socket servers in three regions. A single dedicated server will only be in one region. For latency-sensitive applications like realtime games, having servers close to your users is a must.
If you want to trade off simplicity for lower costs or lower latency, you can also use WebRTC data channels that do p2p communication between the players.
Also, what are the limitations by the hosting provider regarding concurrent connections, data transfer, etc.
I am currently working on a poker app using free Heroku dynos but would like to have a budget in mind for when going live.