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
      He's finally done it! That elusive archaeology sword has popped up today and many fragments were spent getting it, and then getting it completed. The final sword took about 110 archaeology solves, which is pretty good considering. This means that DesMephisto has gathered 100% of the currently obtainable 1-handed swords in the game, adding to his 100% of all available Warrior plate transmogs! As we've mentioned before, there's is a small technicality here, with the missing sword from the Headless Horseman, which won't be available until October 18th. But as that will become available after the pre-patch hits (or won't considering how slow the patch is to arrive), all the new Shadowlands swords will be put into the database, bringing the total down from 100%. But since it is all currently available swords, we can let that one slide!
      And here's the fateful moment itself, when the project popped up, but it took quite a while to gather all the fragments needed to actually solve it:

      And so here's the actual solve itself, when the number really went to 100%:

      Big congrats on getting it all done before the pre-patch hits!
       

      Related DesMephisto articles:
      Average Player Leveling in the Pre-patch and Shadowlands Will Take 8-10 Hours
      The Leveling Expert on the New Heirlooms: DesMephisto Talks Alternatives
      Level 1-50 in 4 Hrs 37 Mins on Shadowlands Beta
      100% of All Plate Acomplished: DesMephisto's Quest Is Complete!
      DesMephisto on the Return of Single-Minded Fury
      DesMephisto's Quest for All the Plate in the World: A Short Interview
      46 Max Level Warriors, Druids/Paladins Next, Guinness World Record, Autism Charity and More: the DesMephisto Interview
    • By BluePosts
      Wild Spirits, the Hunter Covenant Ability, currently deals AoE damage multiple times from a single button press which is not intended and will be fixed on the Beta soon.
      (Source)
      Wild Spirits dealing damage AoE damage multiple times from a single button press (Rapid Fire, Volley, Barrage, etc) is not intended, a hotfix will be sent for this.
    • By BluePosts
      Blizzard talks about the redesigned character creation screen, Druids being able to customize their forms separately in the Barber Shop, and more, in the official preview of character customization options coming in the Shadowlands pre-patch.
      (Source)
      With the Shadowlands pre-expansion patch, you’ll have hundreds of new character customization options available at your fingertips to make characters uniquely yours. Carve your human’s face with battle scars, adorn your blood elves in delicate armlets and wristbands skillfully forged by Silvermoon’s metalsmiths, and give your worgen glowing eyes or vertical-slit pupils to reflect the beast within.
      NEW CHARACTER SELECTION SCREEN
      One of the first things you’ll notice is the character creation screen has been completely remade, with race portraits on either side of the screen and class icons displayed along the bottom. When you select a class, the character displayed springs into action with a flashy animation that captures the essence of the class—Rogues Shadowstep across the screen and unleash a Fan of Knives, Shaman make the ground around them erupt with the fury of the elements, and Priests levitate toward the heavens to embrace the Light.
      Across the board, races will have access to new character customization options including skin tones, hairstyles, and eye colors. Certain races will be able to enhance their look beyond the basics with unique options such as tattoos, jewelry, beards, scars, or flowers to ornament their hair.
      On the character creation screen, you’ll be able to more intuitively navigate between different looks with new drop-down menus. Swatches displaying color choices for eye and skin tones will appear alongside the option number, so instead of needing to scroll between different appearances you’ll be able to quickly click between specific eye and skin tone options. All other cosmetic choices are tied to a name in the drop-down menu to give you a better idea of the selection before you preview it, and will make it easier for you to remember your favorite choices.

      YOUR NAME, YOUR PURPOSE
      When you’re ready to finalize your character, you’ll need to pick out a name. Now you can see if a name is available as soon as you type it into the field at the top of the screen; a green checkmark means you’re good to go, while a red cross means it’s unavailable and you’ll need to try a new variation or new name. Many customization options are no longer dependent on other selections. Previously, a selected hair color would affect the color of facial tattoos or a hair color would determine eye color. Now, you can choose these independently of one another. Additionally, worgen will now be able to change the appearance of their worgen and human forms independently. Simply click on the portrait options at the top right of the screen to access your other half’s customization options.
      CUT AND COLOR CHANGE
      You can freshen up your look during your adventures at any time with the new customizations by visiting any Barber. In addition to customizing your appearance, you can also change the gender of your character at the barber.

      Druids can change their shapeshift appearances at the Barber as well. Now you can choose between forms previously tied to cosmetic glyphs (now called Marks in Shadowlands) and forms previously were restricted due to your characters’ hair or fur color. You’ll also be able to choose between your unlocked account-wide Legion Artifact appearances and the fiery Cat Form from Fandral’s Flamescythe if you have collected the weapon from Firelands on Normal, Heroic, or Timewalking difficulties.
      The new customization changes in the character creation screen and Barber will become available once the Shadowlands pre-expansion patch goes live. Which customization changes are you most looking forward to use to freshen up your current character or to make a new one?
    • By Stan
      Torghast was unavailable for a while, and Blizzard has made some changes to the entrance of the Tower this week on Beta.
      You will no longer need to queue up for Torghast and the individual wings separately. Instead, you will directly teleport to the entrance chamber that has been reworked to include other players.

      A Meeting Stone has been added to Torghast, so that party members can quickly summon each other.

      Here is how the Torghast chamber map looks like in the game. Wings that are currently available are highlighted with an icon.

      You still need to queue up for each wing and the "endless" Twisting Corridors Mode separately.
    • By Starym
      Leveling will be very different in the Shadowlands after the squish, and that all starts in the pre-expansion patch. We recently found out the exact conversion stats for what the current Battle for Azeroth levels will look like when the pre-patch hits, so we'll be taking a look at those.

      We've also been talking about both the average player leveling speed (8-10 hours) and the speedrunners' times on the beta (3-5 hours, dungeon and quest based), covered how the new leveling system works in terms of picking an expansion etc. with Chromie time, as well as how alts can level using bonus objectives, world quests etc. only, and have a general overview guide of the new leveling process, including heirlooms, potions etc. so you can be as informed as possible about the new systems.
      Level Conversion in the Shadowlands (source)
      With the pre-expansion patch, levels, items, and stats will be adjusted to make reaching a new level feel more meaningful while simultaneously making the leveling experience faster than before. Characters at level 120 will become level 50 after the content update. To help you understand how the change will affect your character’s level, we’ve pulled together this handy conversion table.
      Battle for Azeroth Level
      Shadowlands Level
      Battle for Azeroth Level
      Shadowlands Level
      120
      50
      60–63
      25
      118–119
      49
      57–59
      24
      116–117
      48
      54–56
      23
      114–115
      47
      51–53
      22
      112–113
      46
      48–50
      21
      110–111
      45
      45–47
      20
      108–109
      44
      43–44
      19
      106–107
      43
      41–42
      18
      104–105
      42
      39–40
      17
      102–103
      41
      37–38
      16
      100–101
      40
      35–36
      15
      98–99
      39
      32–34
      14
      96–97
      38
      29–30
      13
      94–95
      37
      26–28
      12
      92–93
      36
      23–25
      11
      90–91
      35
      20–22
      10
      88–89
      34
      18–19
      9
      86–87
      33
      16–17
      8
      84–85
      32
      14–15
      7
      82–83
      31
      12–13
      6
      80–81
      30
      10–11
      5
      76–79
      29
      8–9
      4
      72–75
      28
      5–7
      3
      68–71
      27
      2–4
      2
      64–67
      26
      1
      1
×
×
  • Create New...