This last week was an important one for the User Interface team, with many things needing to get done. Especially when it came to the experience of the user. Due to the nature of DuolBots, remembering your controls can be very difficult. There were several plans to fix that issue, and all of them involved one key element: the icons. In many games, the icons are unnecessary since controls are always the same. However, in DuolBots your controls do not have to be the exact same every time you play. Even if your controls are very similar you might not be controlling the same actions on the bot. This creates a unique problem for DuolBots, where controls become very hard to remember. There are also many combinations of button images and action backs. Instead of making each image and just locating them, we split the front and back and combined them together. This also gives us more control over how the images work together after the parts are in the engine as opposed to requiring an artist to fix it if something is wrong.
I worked on implementing the icon generation as well as putting the icons in world space. Icon generation was no easy task as it required special prefabs to be made, for regular images, as well as the images of the D-pad. Then when generating them the program must split the controls based on which player had them. After that I needed to split all “axis” controls, these were controls that had multiple inputs to them. Once that list of controls is made the program then must determine if the control uses the D-pad, or if it can use regular controls, so it knows how to format them. After it knows the format, it can then look up the proper front and back image and place it accordingly. It then must place the objects on the correct layer so that only the player with those controls can see them. Once that finishes you then have all the control icons on their correct layer. After which another script then formats all of them to place them in the correct place and causes them to have to always look at the player.
After all of this was working, we decided that we may want to use these same icons on the UI canvas, not just in world space. This caused some reworks to happen, the biggest problem was that every Unity component we tried either worked on the canvas or in world space. This forced me to replace the component I had with a script that when called would add the correct component for both situations. I then also had to write generic functions to modify the icon objects regardless of what components they had. After all that was done, a lot of testing needed to be done to verify that the icons showed up properly, and worked as intended.
~Ben Lussman, UI Programming Lead
Comments