01 July 2014

Tidbits about the WoW backend

This discussion with Joe Rumsey, a software engineer for World of Warcraft at Blizzard, took place in 2013, but I'm only posting about it now.

  • Their database has 50% read and 50% write. There used to be more writes because the durability of player's equipment used to decrease often in combat. They have a proxy in front of the DB. The proxy flushes to DB periodically. Around 20 shards per DB. Transactions: inventory, trade, zone change, but not combat/monsters state.
  • 800-meter zones. Sort of dynamic zone borders. Would rather have one big zone on one server than two zones with a lot of exchange between them on different servers. Objects are mirrored on adjacent zones. If a zone falls, the entire server falls. To move an entity between two servers, server 1 flushes the entity to DB then server 2 retrieves it from DB; the two servers never exchange the player data.
  • The game server ticks at 2.5 times per second.
  • The clients connect to a proxy.
  • JSON vs binary messages: JSON's performance is fine 95% of the time.

27 June 2014

The loops of Diablo 3

In Vanilla D3 (D3 for short), players could buy or sell gear for in-game gold or real money at the auction house (AH). Players reported feeling frustrated: they drop legendary gear (yay!), but when they check the AH, they realize their legendary gear is actually average. So they buy amazing gear from the AH for cheap, roll over monsters they used to have so much trouble with, and become bored with the game quickly. Damion Schubert, a designer on SWTOR, echoed that the core loop of D2 was much stickier than D3's. So did players during a Reddit Q&A session with D3 designers. Personally, I started a year after the game launched, bought all my gear from the AH for little gold, never dropped any better gear, rarely managed to sell gear on the AH, and left after a month.

Blizzard removed the AH for the D3 expansion, Reaper of Souls (ROS), released in March 2014. The game feels better. Is it because the core game loop is back to what it was in D2?

Two core loops

At its core, Diablo (D2, D3, and ROS) has actually two intertwined core loops: the usual XP loop and the item-game loop. XP loop: kill monsters to accumulate XP to increase level to improve stats and skills to do more damage to kill harder monsters. Item-game loop: kill monsters to drop gear to improve stats and skills to do more damage to kill harder monsters.

To mix these two loops together, the Diablo designers decided that damage was dealt by skills, but increased by stats (e.g. each point of DEX increases damage by 1%) and gear (e.g. increase the damage of fire skills by 10%), especially weapons (which is why 40% of all drops are weapons or off-hand gear).

In D3, characters unlock skills every level until they reach 70. After level 70, characters gain Paragon levels. Each Paragon level gives 1 point to increase a stat. The real goal of Paragon levels is not better stats, but rather frustration control. The item-game loop triggers randomly and irregularly: a player could go for hours without dropping a better gear. The XP loop, on the other hand, is reliable and constantly increasing. In other words, the item-game is a roulette, while the XP loop a grind. While not super fun by themselves, combined they make the game more fun. Interestingly, Paragon levels were an afterthought, and only shipped 3 months after launch.

ROS and removing the AH

The XP loop did not change between Vanilla D3 and ROS, but the item loop did. In D3, the primary way to convert gold into items and vice-versa was the AH. But the AH went out of hand: powerful items were available for cheap, and a hyper-inflation boosted by a gold dupe bug made the economy collapse. In ROS, the AH was decommissioned and replaced by a beefed-up crafting system (crafting was insignificant in Vanilla D3).

As of patch 2.0.5, though, the gear available from crafting is mostly defensive or utility. The best gear is offensive, and dropped from monsters in high difficulty or found randomly in bounty rewards. Except for enchanting, crafting is pointless.