Sponsored By

Implementing Context Sensitive Commands in UI Design

Today's post looks at the implementation of context sensitive commands and the thought process that goes into them.

Josh Bycer, Blogger

April 28, 2016

6 Min Read
Game Developer logo in a gray background | Game Developer

For this next post on important elements of UI design in video games, we come to context sensitive controls. A major part of the turn towards standardization last decade, context sensitive controls are an important part of streamlining a control scheme and make a game easier to play.

More...

UI Design

God of War, originally posted on Destructoid

Context Sensitive:

Obviously, we can define context sensitive controls very easily:

Context Sensitive Controls: Applying multiple commands to a single button, with the game dictating which ones will be used within each context.

Before, many games filled keyboards and gamepads with commands for the player to memorize and learn. In most cases, having these additional options didn't make a game better, but just made it more confusing to have to remember what key was the open button and which one was the close.

Context Sensitive commands work best when you have commands built around black and white contexts; situations where the player needs to perform a specific command and nothing else. One of the best examples of context sensitive commands came from the Assassin's Creed series. Here, the player's "paper doll" interface shows them how different buttons would function based on the situation at hand. The player didn't need a separate "stealth kill" button, when the attack button could do it within the right context.

What happens is that instead of having to learn multiple commands, the player just needs to know the function of the button when the need arise. That last point is important, if commands have distinctive purposes that only occur at specific points, they are great candidates for context sensitive commands instead of having buttons designated for only their use.

UI Design

Assassin's Creed, originally posted on Forbes

The use of a "paper doll" UI allowed the developers to condensed a variety of commands into something easy to follow

One other thing before we move on; even though this should be self explanatory, it's important to call out the fact that if you have generic actions all tied to a general action, those are definitely actions that could be assigned a context sensitive button.

The example I have is pretty simple: You don't need separate buttons for "Open a door, close a door, pull a lever, press a button," when you can simply have a context sensitive "Use" button.

With that said, while context sensitive controls are easy to program, their actual implementation needs some thought.

The Right Tool for the Right Situation:

The challenge of context sensitive UI design is figuring out how to combine button commands; you don't want the player jumping forward when they meant to hide.

Buttons should have commands assigned to them in such a way as the already mentioned black and white scenarios: Commands that the player would never need at the same time. You also need to watch out for putting commands on the same button that could be interacted with in the wrong context.

Let's say as an example that the attack and open door commands are on the same button. While the player is busy fighting an enemy, there is the chance that the game will think the player wants to open a door if the player is fighting near a door; putting them in a position where the wrong command goes off. In this case, you would need to give the "door open" command either its own button or put it on a different button to avoid having the wrong command go off.

UI Design

Batman Arkham City

Context sensitive commands must be situational; something that can only occur at specific situations in the game

Another point to watch out for is when too many commands are tied to a single button press. Remember, the point of context sensitive commands is that you are dealing with conditionals; the more you have tied to one button, the greater the chance that the wrong command will go off.

There is one exception to this, if the commands are all similar to each other, but still different enough that their use is black and white.

For instance, you could tie different attack commands to one button and have both context and an additional button modifier control them.

For those who don't know the term, a modifier is an additional button press that informs the game to make use of different commands depending on the modifier pressed. For instance: Having a modifier for "fire power" would then give you access to the fire's list of commands and usage.

Speaking of modifiers, it's also important to use modifiers if you have commands tied to commonly used controls such as movement. The problem is that it's very easy for the player to input the wrong command while they're busy moving around. For instance, in Valdis Story, the command for dashing is tied to pressing the movement keys twice very quickly. The problem is that it's very easy to dash when you are quickly moving back and forth to try and dodge attacks or move in for a closer hit on enemies.

If they implemented a modifier to confirm to the game that the player meant to dash, then that would have solved that issue. You can see this in the Souls series and how you can only perform a forward jump when you are running; preventing someone from jumping forward and off of a ledge.

One final point that we need to talk about, given the fact that context sensitive commands are not always known for the player, it's becoming more and more important to show them on the game UI under the right situations. Going back to Assassin's Creed, the paper doll constantly updates the UI and the player as to what commands are currently available based on the situation at hand.

While it may be immersion-breaking, you cannot expect the player to remember what button does what for every situation in your game. Some games will pop up the command onto the game space and then removes it when the player moves away; keeping the feeling that the world is immersive, but still providing the necessary information.

Keeping Things Tidy:

Context Sensitive controls in UI Design work to reduce the number of commands the player needs to memorize over the course of playing. As we've talked about, it's important to know what commands should be set up this way and where on the gamepad/keyboard.

You can go as small or as big as you want with context sensitive commands: From simply reducing the number of buttons needed, to even having different "modes" based on the situation at hand. Once again, the best way to figure out how your game controls and if you need context sensitive controls is to play test it. You're never going to know how your game feels until someone picks up a controller or sits in front a computer and starts playing.

(If you enjoyed this post, check out Game-Wisdom, along with the Youtube channel for daily videos. And my Patreon campaign to help keep Game-Wisdom ad free, while continuing to put out great content.)

Read more about:

Featured Blogs

About the Author

Josh Bycer

Blogger

For more than seven years, I have been researching and contributing to the field of game design. These contributions range from QA for professional game productions to writing articles for sites like Gamasutra and Quarter To Three. 

With my site Game-Wisdom our goal is to create a centralized source of critical thinking about the game industry for everyone from enthusiasts, game makers and casual fans; to examine the art and science of games. I also do video plays and analysis on my Youtube channel. I have interviewed over 500 members of the game industry around the world, and I'm a two-time author on game design with "20 Essential Games to Study" and "Game Design Deep Dive Platformers."

Daily news, dev blogs, and stories from Game Developer straight to your inbox

You May Also Like