4
\$\begingroup\$

So I've been wondering, what kind of architecture would games like world of warcraft, diablo 2 (which is most probably a different beast than WoW) use?

As far as I know, RTS games state-syncs every client and server, and the input from the clients get relayed to the server, and all states from all clients will get the same input, because everything is synced.

And because everything is synced, state changes can be done safely, thus allowing large numbers of entities in the game (e.g zerglings), because the clients only need to know the players' inputs.

This is all fine and well, but AFAIK diablo 2 allows players to join servers mid-game, which leads me to believe they use a different architecture. I'm stumped on how they do this though, and if elegant solutions exist for such a thing. Does anyone have a better idea?

\$\endgroup\$

2 Answers 2

2
\$\begingroup\$

I don't know about D2 specifically, but I would imagine it is similar to most MMOs out there. Our basic method is that when new clients connect they request the entire state of the area around them (for D2 it would likely just be the state of the whole server) and then from that point on the server just sends differential updates.

\$\endgroup\$
1
\$\begingroup\$

I dont know anything about the network design behind Diablo or the rest you mention, but I would, make a "node based" mapsystem and when people join you only need to sync them with the current node + surrounding nodes (those directly connected) then you can always update those outside viewpoint once you reach the "border"...

Consider the tiles in a map Like this, I have filled it with the same pattern as A* pathfinding to figure out which tiles are closest to my "X" (starting/current location)

....3.......
6...2.......
5...1...567.
4321X1234.89
....1...567.
..43234.....
.65..456789.

Sorry there might be some "wrong numbers" as I just did them very quick by hand, but the idea is that I would say from my X - update the client initially with up to 10 nodes/distance from my location.

By using star algoritme logic, I can quick figureout which part of the map I need to provide to the client. Once the client is update, and begins to move, I just keep updating the outer border in the direction the client moves.

I dont know if this idea/plan makes any sense, but I hope you can use it somehow.

\$\endgroup\$

You must log in to answer this question.

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