1

I'm currently considering building a simple MMORPG.

The idea is to have a .NET server and downloadable client app.

What's easiest yet efficient way to organize client-server interaction?

I thought of a webservice, but it looks pretty inefficient as long as clients have to perform many game actions quickly (e.g. movement, picking up items, attacking other players, etc)

Creating a custom communication protocol is a very complex task.

Do any off-the-shelf solutions exist?

SharpAffair
  • 5,558
  • 13
  • 78
  • 158

1 Answers1

1

I'm not very experienced in development of communication protocols for games, however, since no answers appeared here for some time I can share my opinion with you.

Communication protocol choice

I suppose you can combine two methods of communication:

  • UDP for information that needs to be received quickly and which you send very often, so a loss of a single packet won't be a problem. You can use UDP to send information like: player position of movements for animations
  • TCP for information that is important and that you have to be sure is received, like an object picked up, player hitting other player, quest start/completion etc.

Choosing data to be sent

Another important thing to remember is to send minimum amount of data, so rather send only X;Y for player position than serialize the whole player object ;).

Designing the communication API and splitting responsibilities between server and clients can depend on few things, like game type and safety vs performance: doing more calculations and putting more responsibilities on the client side can result in better performance of the server, but decreses safety of a game, because it's then more likely someone will try to cheat).

Some sample links just to get you started:

Lukasz M
  • 5,635
  • 2
  • 22
  • 29