Sunday, 7 October 2018

How to design my online Game Server for Unity3d?


Recently, I have been doing multiplayer game development in unity3d. I have got the pretty good idea of how the Unity's MasterServer works in unity.
But now I want to make my own game server from scratch. I researched and got to know that we can use the Google cloud compute and the app engine for making our own matchmaking server and the game host server.
But I am totally clueless how do we start doing coding my server. Do we do it using simple http request and json result? Or is there any other technique that can in real time work with FPS type games also. I dont think that the sending http requests and waiting for it result can be fast enough to work in a FPS type games where every seconds we send more than 100s of datas.
At first I thought of writing php scripts and hosting it to some url, and then sending request to that url and wait for its response. But I found out that if I use this process then for just getting one response from the server it would take me atleast 0.5 seconds or more. In this condition, there would be a lot of lag in game.
I know that game servers work on some kind of tcp or udp networking. But my question is this that what kind of application shall I make for the server to receive these datas and send the processed results fast.



from How to design my online Game Server for Unity3d?

No comments:

Post a Comment