I’m pretty new in a game dev. My background is backend developer for large scale and distributed systems, using wide range of technologies, like pub/sub, streaming , nosql databases etc.
And now I want to try myself in game dev. I want to build card game like Magic the Gathering(Hearthstone)
I have many question, but what really interesting for me right now is communication between the game and server for this type of game( this is Turn-based game, correct??)
I see this game architecture as:
Unity project (game) - is client And all logic execute on the game server (for prevent any option to hack)
What I find in internet:
Approach #1 - Some cloud SAAS solution like:
- Photon (Photon cloud)
- GameSpark
I don’t find how to write the server logic with this services, but understand that this is possible (it is ?).
Approach #2
Another approach which I find in internet is http-pooling and serverless backend approach where:
- Client (unity game) - send request each X ms (lets say 500ms, or maybe 1s)
- Its coming to AWS Gateway ===> AWS Lambda ====> Some database (I think better is use Redis - because this is in-memory cache and its faster then each other db) Here question is a price if game start to be popular. And in general I don’t think that this is good approach
Approch #3
Another approach is: Wrote my own game server and using TCP(not UDP!) connection or websocket connection
Here is some questions:
- 1 server has limit for socket connection… And from my experience the maximum concurrency connection to one server is about 8000-10.000 connections.
And I think if tomorrow my game start be popular and in peek I have 20.000 connections…what I will do ?
- If its correct way to make my own game server? (You know after 3-5 years of development you understand that everything is ready and what you need is just to choose the correct one solution)
Thank you!