Diablo 3 cooperates with Blizzard servers even during single player games. In fact, Blizzard has had problems with the games "melting their servers."

I would like to ask: How do the client and the server communicate? What details does the client leave to the server, and vice versa? What details are redundant - both the client and the server know - and how often do they disagree?

The previous paragraph contains the important questions, but I have a few more that I must explain my motivation towards. I am interested in the programming of botting. Ethical botting - I don't plan on actually abusing the automation to run 24/7. I just find it to be a great programming challenge to glean information from a game, and then make decisions from that information. I am stuck in the starting gate. The unofficial questions from this post would be: How can I make a bot (language, tools, libraries)? Can I get information through the communication between client and server, rather than the brute force pixel detection easily used in more static games?

There probably is a trust issue, and to that all I can say is that I promise not to abuse the answers. But please feel free to answer any of the questions you feel comfortable with. Thank you!

  • 2
    \$\begingroup\$ I'd like to be the first to let you know, that neither of us wrote Diablo III, and can't accurately tell you how they made their game. - Also, explaining so frivolously that you're not going to abuse it just makes you look guilty. We all know Diablo III gold sells for real money. ;) \$\endgroup\$
    – William
    Jul 1, 2012 at 4:48
  • \$\begingroup\$ The specifics of what Diablo 3 does are not published anywhere. However, this is a really good example of what an FPS game can do for networking: developer.valvesoftware.com/wiki/Source_Multiplayer_Networking \$\endgroup\$
    – Tetrad
    Aug 22, 2012 at 20:53

2 Answers 2


In case of Diablo 3, client sends to server almost everything: clicking on an NPC, clicking on ground to move, using a key to use ability, setting an ability, changing an item's place in your backpack (even though it has absolutely no effect on anyone and item positions could be safely stored locally - and only a list of items in backpack must be updated on server when you pick/drop an item, use it or give to someone). What isn't sent to server is e.g. moving your mouse cursor, minimizing your game or changing video resolution.

Server sends to client everything it should know - monsters in sight (in some games too soon, and that's why map hacks are possible there), actions of another players (or rather effects of them), and results of your actions: what item did you craft? what loot do a monster drop? did you attack critically or not? did you move or connection failed you and you still stand in the old place?

The failed connection scenario is the only reason a client and a server should 'disagree'. It happens sometimes in Diablo 3 because it's client is cheating the player. When You click somewhere on ground, your character moves instantly, even though you need at least 50 ms for request to go to server and back. When connection gets laggy, it's clearly visible because of gold picking, as client simulates only changing position of a character, and not picking the gold, hence sometimes you run through a gold piece and see it disappear after a few more steps. And in case of packets lose, the client will disagree with server as to your position, but as the server is always right, not the client, you will be teleported to where server says you should be. Such 'disagreement' is called a desynchronisation, and often makes a game crash.

When making a bot, language of the bot-client doesn't matter as long, as it supports the right technology to connect to the server. In case of Diablo it will be sockets, sometimes just a http POST or GET request to server. Just like with hacking, making bots are easiest when you test them on your own servers first. To put it simply, it's hard to play chess if you always play as black, and don't really understand the strategies of the white player (it's also hard to understand the analogy to chess if you didn't play them much).

White Player (W) makes a server, and a client Black Player (B) makes an automated client W encrypts data using some simple technique (xoring every character) B decompiles the original client or guesses encryption method and implements decryption in his automated client W makes the client always send his version to the server, and make it behave differently from version to version, then the server bans the client's IP if it doesn't act as expected for his version B either looks into original client and updates his bot regularly, or never played as W and doesn't understand part of data (verid=1.5.2) and loses the game.

Bots are usually not hard to make, though when an admin looks into logs, they're often obviously visible.


You should inspect the incoming and outgoing network traffic with programs like wireshark to detect wich information is sent or retrieves. But I believe this information could be encrypted...


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .