Search code examples
asp.nethtmlbrowsermultiplayer

Browser HTML5 turn-based multiplayer game with ASP.NET (MVC 4) reasonable?


as the title says, I want to develop a browser multiplayer game with HTML5. The game will be something like "risk", the turn-based strategy game. I decided to develop with HTML5 and the new canvas.

But the problem is on the server side. When I google, I only get answers, where people use "System.io", "node.js" etc. for that.

So my question is:

Is ASP.NET - especially MVC 4 - a bad choice for my purpose? I would like to do that with asp.net, but of course not when there is an easier/more suited option.

Some people say asp.net is not suited for that, it's too complicated and so on.

But I ask you pros out there :D

Would you consider developing a game like that with asp.net mvc 4 or better stick to other solutions with system.io and node.js and other frameworks? (php?)

I hope you can help my out, that stresses me for weeks now :(

Thanks in Advance!

Greetings from Munich

Tornister


Solution

  • Asp.net, especially MVC is well suited to develop an html5 based game.

    A turn based game, is not very different from a web based chat. Where you send messages between members via the server.

    To design a scalable solution, you got to use the right methods though.

    You have various options to communicate between users.

    Libraries like SignalR would help. If you do want to do it yourself, the most efficient method is to use a IHttpAsyncHandler and ajax requests. In MVC the equivalend it AsyncController.

    Frameworks like node.js are designed to be async, and thus well suited. Php out of the box is not a good choice for such applications as it doesn't support async requests.

    To sum it up, asp.net is not a bad choice, but you need to know how to use it. If you are more comfortable with another framework like node.js, then you should choose that one. Familiarity reduces a lot of development time.