- Home /
The question is answered, right answer was accepted
Asynchronous Game server
Hi,
I am building an asynchronous multiplayer game (up to 4 players in game). But I am stuck at choosing the server side solution.
For me this kind of game, asynchronous, can be handled by only http requests and a database (to maintain a game for example).
I found a lot of solutions like SmartFox, Electrocloud or Photon. But what are the advantage of those solutions for a no realtime game.
I think that Windows Azure WebRole for example is a better solution because I don't need any realtime feature. But maybe I am wrong.
Thanks a lot for your help and advices.
NO!!!!! I'm not allowing you to make a game multiplayer using HTTP requests!!!
Because HTTP is not built for anything but what it's usually used for, while you are making a game! Would you use a desk lamp as an oven? Would you use a firelighter as a stove?
@Benproductions1: Actually almost all $$anonymous$$$$anonymous$$O browser games use HTTP / AJAX requests for server communication, so why is that a problem? If he really doesn't need realtime responses it's absolutely fine. I actually work in a browser games company ;) I don't work with php / html / javascript / flash, but all our games use a php backend.
Thanks Bunny83 you reassure me, for an example, a request should only validate a move (e.g. for a chess game).
Answer by Fattie · Apr 04, 2013 at 11:53 AM
"As I explained, we can compare the game with a chess game."
Just write a few lines of PHP (or Perl if you're over 30) on a normal, everyday "LAMP" stack. So it's just php/perl and MySql with cgi on a vanilla web server
Look no further - it would be silly to do it any other way more complicated.
Once your income stream is over, let's say, $50,000 a year, look at other options.
"Look no further - it would be silly to do it any other way more complicated."
That was my idea. Thanks for the advice !
How would I get started using PHP to make a server? is there any tutorial series or something?
Answer by MorphingDragon · Apr 03, 2013 at 12:01 AM
In the Unity Networking guide they have information about Master Servers, protocols and state manage that could answer a lot of your possible questions.
http://docs.unity3d.com/Documentation/Components/NetworkReferenceGuide.html http://docs.unity3d.com/Documentation/Components/net-MasterServer.html
For the love of God don't use HTTP in games, there's a lot of unnecessary overhead. If you don't need realtime updating you could use Reliable Delta Compressed mode in Unity.
I looked at the Unity $$anonymous$$aster server, but it seems to be an overkill solution for my project. We can compare my project to a chess game. I don't get the point of building such a server side solution.
Except you want database access and global state, so I fail to see how the Unity server is overkill. It doesn't matter how simple your game is, but the features you want out of your server.
Why are we talking about the Unity $$anonymous$$aster Server, that server is purely built to register and connect to games (A host management system) You should use it, but not for making the game multiplayer, because thats impossible! Look into Unity RPC calls, thats what you should use!
Actually a solid webserver is much more reliable than Unity's networking especially when one of the player should act as server and sits (as most users) behind a NAT router. I never used a SmartFox server but it seems to be one of the best solutions. However it depends on how many users you expect to play the game and how much money you are willing to spend.
If you have no up to a little money:
Unity's built-in networking is probably the easiest one to use. However if you can't host your own masterserver for match-making you have to rely on the development masterserver hosted by UT which is sometimes a bit unreliable and might be overloaded.
Using a webserver is much more reliable but might be a bit more challanging to setup depending on your php / mysql skills ;)
If you're a small company and you want to serve 30-xxx players, it might be better to rent a smartfox server.
Those are just some basic suggestions. What you need depends on your exact situation and specifications.