🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Working on my first game, advice needed with Web Service

Started by
2 comments, last by hplus0603 10 years, 8 months ago

So I am working on my first game and would like some advice as this is new to me. The game will be a CCG and will have the following features

1) Matchmaking based on player ranking

2) Tournaments

3) In app purchases

4) Trading

5) Deck building

The game will start off on iOS, but would like the flexibility to handle other platforms as well (Android, Web, etc), so Game Center is out. I have some experience with .net, so could probably roll my own service to handle some of these features but was wondering it anyone had any suggestions on how to proceed?

Advertisement

Firstly, decide if you want to use REST or SOAP for your Web Service requests and responses. The first one is simpler and lightweight, the second one is a bit more complex as it involves RPC process via sending commands in XML format over HTTP. If you are just starting, I would recommend REST.

Secondly, think about your server architecture. For example you may want to have a single "gate" server and the rest of the servers to which player will actually make calls. It is needed for decreasing latency and single-server load.

C# and .NET are capable of providing mechanisms for doing all of that. If you have the knowledge of .NET, it is enough.

Firstly, decide if you want to use REST or SOAP for your Web Service requests and responses. The first one is simpler and lightweight, the second one is a bit more complex as it involves RPC process via sending commands in XML format over HTTP. If you are just starting, I would recommend REST.

Secondly, think about your server architecture. For example you may want to have a single "gate" server and the rest of the servers to which player will actually make calls. It is needed for decreasing latency and single-server load.

C# and .NET are capable of providing mechanisms for doing all of that. If you have the knowledge of .NET, it is enough.

I would definitely go with a REST based solution and if I were to write my own C# service, there is a cool framework called ServiceStack that makes rest based services easy. I am wondering if I should use a service like Parse as they offer a lot of cool features that I would otherwise have to write myself. The only crappy part is that their custom code has to be written in JavaScript.

There are many services that offer application hosting for custom applications. Examples include Heroku, and Google App Engine.

The main thing that is hard with these services for games is that the "matchmaking" part typically needs to be integrated with the "game servers" part, which often makes it a lot harder, as the application servers typically are request/response, HTTP based, rather than permanent-connection, state based.

Btw: I would recommend against RPC for anything that goes across the public internet (this includes XMLRPC and SOAP and others,) and typically recommend against it for anything internal as well. Trying to pretend a remote endpoint is local (which is the intent of RPC) just never works out right. Much better to explicitly design for remote services, make the amount of data transferred per request be large, and make the number of requests small.

enum Bool { True, False, FileNotFound };

This topic is closed to new replies.

Advertisement