Mutually exclusive

« Back to Glossary Index

Two or more events are mutually exclusive if they cannot occur at the same time. For example, if your bedroom lights are on, they therefore cannot also be off. The lights being on precludes them from being in the state “off”, just as your lights being “off” means they cannot also be “on”.

In a game, you may have things in your game that can never happen together. For example, perhaps the player plays a round of rock-paper-scissors. For the player’s turn, they can only play one of “rock”, “paper”, or “scissors”. It’s impossible for them to play more than one move for their turn. Playing “paper” means the player cannot also play “rock” or “scissors” for that particular turn. Thus, the player’s move choices are mutually exclusive.

These don’t necessarily have to be mutually exclusive in real-life either; they can simply be mutually exclusive to your game logic. For example, if your game has three romance routes the player can take, but the player can only ever romance one character at a time, the romance routes are mutually exclusive. Being on one romance route means you aren’t on either of the other two routes.

For coding, this is particularly important when choosing what sort of variable type you should use when declaring a variable in order to ensure you don’t end up in a scenario where two things which shouldn’t be able to happen at the same time are somehow both valid.

« Back to Glossary Index