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 Staff
      If you plan on buying the physical War Within Collector's Edition and live in Europe, you're going to have a bad time!
      Blizzard has ceased distributing WoW Collector's Editions through retailers with the release of Dragonflight, making the Blizzard Store the only place to buy them. However, the shipping costs could be a dealbreaker for many collectors eager to acquire the latest edition for the upcoming expansion.
      Reddit user katamai from Serbia posted a screenshot of their order, revealing that the shipping fees exceed the cost of the box itself—280 Euros for shipping compared to 200 Euros for the box, totaling 480 Euros.

      Additionally, Emi, a follower on our Facebook page, reported a shipping cost of 99 Euros to Romania, nearly ten times what it costs to ship to the UK.

      A practical workaround might be to order the Collector's Edition to a UK address and then use a shipping service to forward it to your address in Europe, potentially saving a considerable amount of money.
      How much does it cost to ship the box to your country?
    • By Staff
      We're looking at the Dwarf Mech Mounts coming in the War Within expansion.
      Currently, there are 3 tints of the mounts.
      Bronze
       
      Gold


      Silver

    • By Staff
      Dragonflight Season 4 is upon us and here's a handy visual gearing guide by Reddit user gandalin1306 to help you get started!
      If you're curious about the upgrade tracks for season 4 and the crests required for upgrades, look no further. Here’s a detailed visual guide created by Reddit user gandalin1306.
      Update: gandalin1306 updated the gearing guide, adding Whelpling Crest drops to Heroic dungeons. The image below has been updated.

      Source: Reddit
    • By Staff
      We've already talked about and taken a first look at the Delve-specific mount coming in the War Within, but now it's time to check out all of its customization options! 
      LeystTV has delved into the mount and shown off all the options, from the different colors to nose, wing, thruster, and top customizations, with glider, blimp, helicopter looks and more! There's even different versions of Horde and Alliance decals to choose from! 

      And these may not even be all the options present at launch, not to mention new ones Blizzard might add with later patches, making this one of the cooler mounts in the game.
    • By Starym
      We have a Crest switch fix and weekly maximum increase, as well as a quest fix in retail, the big class tuning pass for Season of Discovery, and more in today's hotfixes.
      April 23 (Source)
      Items
      Season 3 (Dreaming) crests are now correctly removed from players' currency tabs. Players have received a small amount of gold for their unused Dreaming Crests. Players can now earn up to 120 crests of each type per week in Dragonflight Season 4 (was a maximum of 90 per week in Season 3). This will allow for up to 8 upgrades per week, per crest type (was 6 in Season 3). Developers' notes: For players who don't reach their maximum crest earnings in a given week, we've implemented the increasing-seasonal-cap system from previous seasons. Please note that this increase is likely applicable to Season 4 only. We expect the weekly maximum to return to 90 for The War Within Season One. Quests
      Resolved an issue where abandoning the quest "Something Worth Celebrating" could make it unavailable. Cataclysm Classic
      The dates for Children’s Week have been adjusted so that the holiday begins and ends three days later than previously scheduled. Season of Discovery
      Players who have completed the quest "Warranty Claim" but have misplaced their Pristine G-7 C.O.R.E. Processor before handing in the quest "Salvaging the Salvagematic" may now speak with the Lost and Found vendor Rix Xizzix in Booty Bay to recover the misplaced quest item. Fixed a Sunken Temple issue where the Atal'ai Defenders encounter would not reset properly. Druid The Natural Weapons talents now increases all damage done by druids in Season of Discovery, instead of just physical damage. The Gale Winds rune now reduces the mana cost of Hurricane by 60%. Swiftmend no longer consumes a Rejuvenation or Regrowth effect on the target when used. Developers’ notes: Please note that it does still require Rejuvenation or Regrowth to be on the target to be used. Hunter Rapid Killing now reduces the cooldown of Rapid Fire by 80% (was a reduction of 2 minutes). Chimera Shot weapon damage percent increased to 135% (was 120%). Explosive Shot base damage before attack power increased by 50%. Sniper Training has an additional new effect: while Sniper Training is at 5 stacks, Aimed Shot is instant. Serpent Spread now causes Multi-shot to apply Serpent Sting to its targets for 12 seconds (was 6 seconds). Steady Shot now deals 100% weapon damage (was 75%). Developers’ notes: There are more adjustments coming for Hunters. In general, we intend to improve the ranged playstyle and diminish the melee playstyle so that the two become more equivalent. Paladin Seal of Righteousness damage can now be critical hits. Sacred Shield’s duration is extended to 60 seconds (was 30 seconds). Crusader Strike has now gained an additional effect: Crusader strike now refreshes all judgement effects active on the target to a 30 second remaining duration. Seal of Martyrdom can now “twist” with other seals, including Seal of Command. Developers’ notes: Seal twisting was an interesting emergent effect that became popular during the original Burning Crusade, that utilized the slower server messaging system used in early versions of WoW to slightly extend the duration of the paladin’s active seal for a short time whenever a second seal was cast. This effectively allowed paladins to momentarily gain the benefit of two seals at once if they timed the application of a new seal to line up perfectly just before their weapon swing. We recreated this playstyle in Burning Crusade Classic and since then it’s been a popular request in other versions of original WoW, including Season of Discovery. As the game matures and we continue to listen to player feedback however, we recognize that for some, this is part of the charm and uniqueness of playing a paladin during those early eras of WoW’s history. We consider this change to be experimental and we will watch the performance and behavior of Retribution closely after this change. Priest Shadowform now increases all shadow damage done by 25% (was 15%). Rogue Saber Slash bleed now stacks up to 5 times. Saber Slash bleed now also increases the impact damage done by Sinister Strike and Saber Slash by 15% per stack for the rogue who applied the bleed. Saber Slash bleed now deals 3% of the rogue’s Attack Power in damage per tick (was 5%). Shaman Mental Dexterity now only triggers from dealing damage with Stormstrike and Lava Lash, and it now lasts 30 seconds (was 10 seconds). Burn now increases Flame Shock Damage by 100% and flame shock DoT duration by 6 seconds, and causes Flame Shock to strike up to 5 targets (was 3 targets). Developers’ notes: We’ve received a lot of feedback about the overall usability of mental dexterity, particularly for Elemental Shamans. This ability was not intended to be used by elemental, so the adjustments we’ve made are to help ensure its usage is a bit more enhancement-centric. To compensate, we’ve increased the output and usability of the Burn rune, with a slight quality-of-life improvement in the form of a Flame Shock duration increase which allows two Lava Burst casts to be used within a single Flame Shock duration.
×
×
  • Create New...