Jump to content
FORUMS
Sign in to follow this  
Stan

Engineer's Workshop: The WoW Companion App and Multi-Expansion Support

Recommended Posts

51634-engineers-workshop-developing-for-

In the second installment of the Engineer's Workshop, Blizzard goes into detail on how they developed the WoW Companion App to support multiple expansions and how separating the individual expansions lead to shorter downloads.

The first Engineer's Workshop was about the new auto-battle feature coming in the Shadowalands and multi-platform support.

Blizzard Logo(Source)

One of the biggest technical upgrades we made to the WoW Companion App for Shadowlands is the ability to support multiple expansions. We know it’s a feature many players have been asking for, and today we wanted to share some of the challenges and decisions involved in making this kind of large-scale tech change.

A Little History

The Companion App was originally designed to support one expansion: Legion. Leading up to Battle for Azeroth, we made the decision to prioritize several major back-end improvements, including the ability for the app to share code with the PC client, which allows us to take advantage of many of the features and tools that are available to the main game’s UI (user interface) that the app previously did not have access to. The tradeoff was that we weren’t able to build out the kind of framework that would be necessary to support more than one expansion at a time—so we swapped the single expansion that the app supported from Legion to the latest expansion, Battle for Azeroth.

We know that players were disappointed to lose access to Legion content within the app when we made the switch, so we made a commitment with Shadowlands to support more than one expansion at a time. In addition, the mobile team was eager to give the community what they wanted and bring back Legion content.

We briefly discussed the option of supporting only partial functionality from previous expansions to maximize our ability to work on Shadowlands content, but we quickly decided that we wanted to restore as much functionality as possible. We also knew that with the arrival of Shadowlands, players would have the option to level their alts through Legion via Timewalking Campaigns, and we wanted to make sure those players would have full mobile support for their level-up experience.

Choose Your Expansion

The Companion App will let players choose between Legion and Battle for Azeroth starting at Shadowlands pre-patch, with Shadowlands content becoming available at the launch of the expansion.

In what turned out to be a bit of a mixed blessing, most of the Legion-specific code was still present in the app, and we still had the original Legion assets in our source control, which made re-adding Legion content the perfect test for our new multi-expansion framework. And while there was not a lot left to implement, it did mean we had some work to do to cleanly separate Legion and Battle for Azeroth from each other.

Creating the multi-expansion framework required three major pieces:

  1. The app needed to clear out any data for your current expansion content and request data for a new expansion from the server.
  2. We needed to split expansion-specific UI code apart to keep functionality separate.
  3. We needed to break up expansion-specific assets to minimize the app’s resource usage.

Expansion Data

When the Legion Companion App was originally developed, most of the server code that handled requests from the app was purpose-built to only return Legion data. When the time came to switch over to Battle for Azeroth, we changed those functions to return Battle for Azeroth data instead. This time, however, we needed the ability to fetch data for any expansion selected, which meant going through all of the server functions that respond to mobile requests and changing them to accept parameters specifying which expansion to fetch data for. For example, the request for Follower data needed to be able to specify a Follower type (e.g. Legion follower or Battle for Azeroth follower), and the request for World Quests needed to include which zones it wanted quest data for.

The app itself also had a number of places that were extended to specifically support Battle for Azeroth. In Legion, the app specifically requested your Order Hall Resources; for Battle for Azeroth, we simply added War Resources to that message. Rather than continue to add more currencies to the same message for Shadowlands, we chose to port the entire currency system in the PC client to the new shared-code framework that was developed for Battle for Azeroth. That means that every expansion is now able to automatically request its own currency types instead of having to manually specify which currencies we want.

Before Currency Data Query

Before: The app requested specific currencies from the server.

After Currency Data Query

After: Each expansion can ask for its own currencies. This code may seem familiar if you look at any add-ons that use the currency system in Shadowlands—that’s due to the shared-code framework that allows the WoW Companion App to share features with the main game.

UI Code

Much of the code that was written to support the Battle for Azeroth expansion was written on top of the existing Legion code, which made it challenging to understand what code was actively in use. For example, the Battle for Azeroth Followers list still had the ability to show Armaments, except the Armaments button was hidden so that code was never called. Expansion functionality for Legion and Battle for Azeroth were similar enough that this wasn’t a huge problem, but we knew that with the new features we were adding for Shadowlands, it wasn’t going to be feasible to maintain that kind of architecture. If code that was being shared with Legion and Battle for Azeroth suddenly needed to support things like Soulbinds and Covenants, it was only going to become more complex than it already was.

Instead, we went through each script, figuring out which functionality was shared and which was specific to one expansion. We split expansion-specific code into subclasses or completely new components, keeping only the shared, base functionality in the parent classes, and made new game objects for each expansion using those new subclasses. Now, even though they’re backed by the same system and share the majority of their functionality, only the Legion Missions list needs to have a Combat Ally button, and the Shadowlands Adventures list is able do things like get rid of the two-tab design that Legion and Battle for Azeroth used and display enemy portraits instead of mission type icons.

Comparison Between Legion Mission List and Shadowlands Adventures List

Side by side comparison of Legion Missions list and Shadowlands Adventures list.

Another significant behind-the-scenes change we made to the app for Shadowlands is how we generate database files; the Companion App now builds its database code and data files using the same pipeline as PC. One place where that came in handy is in the code that determines which map each World Quest gets displayed on. The app originally made that decision using manual logic for each map ID, which wasn’t a problem when it only needed to support Argus and the Broken Isles. As we added more zones for Battle for Azeroth, however, it quickly became cumbersome. Rather than continue maintaining that code for Shadowlands, we were able to easily pull in the UI Map database tables we needed to make the system completely dynamic, converting a large chunk of code that used to have to handle zones for all three expansions into a single, slim function that can automatically handle any World Quest without any expansion-specific logic.

Asset Files

One big difference between mobile and PC development is that on mobile, we have to keep in mind that players may be using the app on a cellular connection with a data cap or poor connectivity. We need to ensure that players have a fun experience without encountering frustration while using the app regardless of their internet connection, and one of the ways we do that is by limiting how much data players need to download in order to use the app.

Each expansion has a lot of asset files that can add up very quickly, and going from one expansion in the app for Legion and Battle for Azeroth to three expansion support for Shadowlands meant we would be tripling the amount of data needed by the app. However, many assets are only used by one expansion, such as hi-res world map textures, mission location backgrounds, and follower and enemy portraits, so we made the decision to separate those assets into different bundles for each expansion. By doing that, the app only needs to load assets into memory that are used by the currently active expansion, reducing the amount of memory the app uses.

We also decided early on to split each expansion into its own game scene, which let us maintain a clean separation of functionality between expansions. The Legion game scene doesn’t need a Covenant Callings page, and the Shadowlands game scene doesn’t have a Troop Shipments window. Just like the changes we made to the code, this makes it much easier to grasp what’s happening in the app at any given time. Splitting both the assets and the game scenes like this means that each expansion is self-contained, which also paved the way for some more user-friendly download options.

We wanted to give players more control over when they need to download assets for the app. You can choose to download everything all at once when you’re on a stable connection, or you can choose to download assets for other expansions later so you can get into the app faster. And if you choose not to interact with a specific expansion, you’re never forced to download assets for it. At 30-40 MB per expansion, that’s a significant amount of data to be able to skip downloading!

Selective Download For Each Expansion

Separating each expansion means a shorter download to get in and start playing!

Pipeline Changes

Splitting our assets per expansion required changes to two pieces of our pipeline: our asset curation tool needed to know which assets belonged to which expansion, and our asset bundle creation tool needed to be able to group those assets together when it built the final bundles. The asset curation tool was another aspect that was heavily specialized to support Legion and then Battle for Azeroth, so we had to rewrite it to be more expansion-agnostic. The new version of the tool goes through the list of expansions with content the Companion App might want (by iterating over the GarrisonType enumeration) and outputs assets for each expansion into separate folders. Modifying the curation tool to use the full list of expansions also means that it will automatically pick up any values added to that list in the future, making it easier to add new content to the Companion App without having to continually make updates to our tools.

Our asset file creation and runtime loading make heavy use of Unity’s AssetBundle variants feature, which lets the app treat different versions of a single bundle file as if they were the same bundle. The bundle creation pipeline makes a different variant of each bundle for each expansion, based on the expansion-specific folders output by the curation tool. Those asset bundles are swapped out at runtime whenever you switch expansions in the app. Because all variants of a bundle can be treated the same, any code that needs to fetch Follower portraits, for example, can do so without worrying about which specific set of Follower portraits is currently loaded. This insulates our feature code from worrying about the nuts and bolts of asset loading and unloading; each expansion can pretend like it’s the only expansion in the app.

Into the Shadowlands

Whether you’re playing the new Adventures content in Shadowlands or leveling a fresh alt through Legion, we’re incredibly excited to be able to give you more World of Warcraft content on the go! We hope this has given everyone an interesting peek into the kind of work we do and some of the decisions that go into designing frameworks that can support not only current content but also whatever World of Warcraft may have in store for the future.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Starym
      Valor Points are coming this week and are supposed to save/improve Mythic+ gearing but, as our own Seliathan goes into in-depth, it's not quite a good enough improvement on the already pretty messy Mythic+ loot system.
      Seliathan is an Icy Veins Rogue class guide writer, completed several World First Mythic+ clears, including the +20, and he wrote a big piece for Raider.IO, analyzing the M+ gear and the way the Valor Point system will affect it, the flaws in both, and how to improve them. And while Blizzard are removing the 1500 cap on Valor, exactly as the article suggests, there are many more problems and potential solutions presented there. He goes over many topics, including how M+ gearing compares to PvP and raiding, what the actual purpose of M+ is and where it fits in the overall gearing scheme, the lack of other rewards in M+, the need for higher Keystone Master-type achievement tiers and a lot more. Here are some highlights, but head straight on to the full (and huge) analysis post on Raider.IO if you want all the details:
      There's a LOT more to read over in the full article on Raider.IO, with many excellent points and insights into Mythic+ and how it could be improved, so make sure to read the whole thing!
    • By Staff
      We now have official confirmation that the 1500 held Valor cap has been removed! We recently had an in-depth look at the system and its flaws, and while this particular change will improve it significantly, there's still a lot of issues with Mythic+ gearing, so check out the full article here.
      Valor Cap (source)
      This is correct. There will not be a limit of 1500 Valor that can be held.
      I’ve put a strikethrough on that part of the OP.
    • By Stan
      Today, we’re looking at the most popular team compositions for Mythic+ in Shadowlands Season 1.
      Disclaimer
      The data used in this article comes from Benched.me, a website with a Composition Explorer function, which tells you the most-popular compositions for Mythic+. It has a search function that allows you to select specializations for each party slot and find compositions.
      The Most Popular Team Compositions for Mythic+ in Shadowlands Season 1
      Currently, the most popular team comp with 36,604 runs so far in Season 1 includes a Vengeance Demon Hunter (Tank), Restoration Shaman (Healer), Marksmanship Hunter (DPS), Balance Druid (DPS), and Fire Mage (DPS).
      In 2nd place, we have the exact same team composition, with just one change. The Restoration Shaman (Healer) is replaced with Holy Paladin. The composition has 21,852 runs.
      In 3rd place, we have the same composition, but the Healer got replaced with a Restoration Druid this time around. We've seen this composition in 17,546 runs.
      Based on the data, it is relatively safe to assume that the current Mythic+ meta revolves around a Vengeance Demon Hunter tank, Marksmanship Hunter + Balance Druid + Fire Mage (DPS), with healers rotating between Druid, Shaman, and Paladin.
      You can check out the table below for more information about the most popular comps, including Average/Max Keystone, cleared, and more. We encourage you to visit Benched.me for even more runs.
       
    • By Stan
      Covenant Callings will reward Valor starting tomorrow, so make sure to save them until Patch 9.0.5 goes live in your region!

      Rare Covenant Callings in Patch 9.0.5 award 35 Valor. Epic Covenant Callings grant you 50 Valor.

      One character can hold up to 3 Covenant Callings at a time, which means you should wait until Tuesday (US) or Wednesday (EU) before you complete / turn in any Covenant Callings for extra Valor.
    • By Stan
      Blizzard is bringing back Valor in Patch 9.0.5, and the currency is used to upgrade Mythic Dungeon Gear, but what are the upgrade costs?
      The Red Rogue discovered the exact upgrade costs of gear with Valor in Patch 9.0.5 with a few missing slots, but before we go through them, let's talk about how the whole system works.
      Item Ranks and Upgrades
      Every item from dungeons in Patch 9.0.5 is given a rank based on their Item Level, as you can see on the tooltip.

      The items go from Rank 1 (Item Level 184) to Rank 12 (Item Level 220).
      This also applies to Great Vault loot. For example, if you receive Item Level 200 from the weekly chest, it will be of Rank 6/12.

      Base Mythic Gear (Item Level 184) can be upgraded to Item Level 200 without any requirements. All the higher rank upgrades are gated behind various achievements that require you to complete all Shadowlands Season 1 dungeons at Mythic Level 5, 10, and 15 within the time limit.
      In other words, if you want to upgrade Dungeon Gear to Item Level 220, you must complete all 8 Shadowlands Season 1 dungeons at Mythic 15 or above, within the time limit.
      We summarized everything explained above in the following table:
      Item Rank Item Level Requirements 1 184 No Requirements 2 187 No Requirements 3 190 No Requirements 4 194 No Requirements 5 197 No Requirements 6 200 No Requirements 7 203 Shadowlands Keystone Explorer: Season One 8 207 Shadowlands Keystone Explorer: Season One 9 210 Shadowlands Keystone Conqueror: Season One 10 213 Shadowlands Keystone Conqueror: Season One 11 216 Shadowlands Keystone Master: Season One 12 220 Shadowlands Keystone Master: Season One It's important to note that you can't upgrade gear obtained before Patch 9.0.5, which means you must re-farm everything when the patch goes live.
      Valor Caps
      You can have a maximum of 8,750 Valor, but the cap starts at 5,000 and increases by 750 each week. Blizzard also said one character could only hold 1,500 Valor at a time, but that may have been scrapped in the end.
      9.0.5 Week 1 Maximum Cap: 5,000 9.0.5 Week 2 Maximum Cap: 5,750 9.0.5 Week 3 Maximum Cap: 6,500 9.0.5 Week 4 Maximum Cap: 7,250 9.0.5 Week 5 Maximum Cap: 8,750 Weekly Cap: N/A Upgrade Costs
      Now that we know more about item ranks and caps, we are looking at how much Valor you will need for upgrades.
      All the data is provided by The Red Rogue, who also uploaded a handy video about the whole system. You can follow him on YouTube.
      You can upgrade gear by bringing it to Aggressor Zo'dash <Facilitator of Conflict> in Oribos, located in the Enclave of Oribos.
      The upgrade process is straightforward and works just like upgrading PvP or Covenant gear.
      The upgrade costs are different for each slot.
      Off-Hands, Rings, Cloaks, Bracers, Necks cost 250 Valor per upgrade. Shoulders, Gloves, Trinkets, Boots, Belts cost 400 Valor per upgrade. Helms, Chests, Legs cost 475 Valor per upgrade. 1-Handed Agility Weapon costs 500 Valor per upgrade 1-Handed Intellect Weapon costs 750 Valor per upgrade. 2-Handed Weapons cost 1,000 Valor per upgrade. The costs of 1-Handed Strength Weapons and Shields remain unknown for now, but based on PvP Upgrade costs, a 1H Weapon + Shield upgrades together should cost the same amount of Valor per upgrade just like a 2H weapon, so 500 Valor per item per upgrade (needs confirmation).
×
×
  • Create New...