One of the marks of a more sophisticated narrative is one where there is no clear bad guy. Sure, there might be a person we hate, or want to fail, but in general that is a matter of perspective. We see things from the protagonist's point of view, and people tend to see themselves as the good guy. Very rare is the person who makes the choice to be evil, or that when presented with a choice opts for the path they think is not the right one to take.
However, when it comes to RPGs sometimes this sophistication is something we actually don't want. Why? Because when you humanize the opponent and make it hard to spot a clear bad guy, you bring up all sorts of philosophical questions that people sometimes don't want to deal with at the gaming table. As fun as it can be to show that a goblin hunter cares for and loves his goblin dog, do you really want to spend every Friday night with your D&D group feeling like shit because you killed the guys dog during a combat encounter?
The question then becomes not only how do we humanize the enemy, but when do we want to do so. I'm hoping to answer that question for you today.
Star Wars: Sophisticated vs. Simple
Star Wars is a great example where steps were taken to dehumanize the enemy and it shows. How does it show? Well, boiled down to its simplest elements the plot for Episode IV: A New Hope is: a young boy joins up with the rebellion and aids in taking down a large military super weapon. That is the main plotline for that movie. Changing a few words we can make Rebellion into Terrorist Organization and Super Weapon into "Military base."
A quick google search and a clip from Clerks is all you need to see the argument for the Rebels as the bad guys. However, the movie goes out of its way to de-humanize the bad guys. We have the dissolution of a democracy for a government system based on fear to keep "people in line." We have the destruction of a peaceful planet with no weapons to prove a point/test a super weapon.
Why did they do that? Because the creators want you to root for Luke and not feel guilty about it. Star Wars is an adventure movie that harkens back to the old Flash Gordon shows. It is not about shades of gray. it is black and white. Democracy, hope, and freedom on one side, tyrannical control, despair, and fear on the other. Over the years people have grayed up Star Wars to varying degrees of success. It works fine. But you have to do it when it works.
Pet The Dog vs. Kick The Dog
There are two tropes - I'll let you look them up on your own since they're TV Tropes - that govern the humanization or de-humanization of a character.
The first is "pet the dog." This is where you show a character thought to be evil/bad guy doing something that is kind. Often this is done as showing kindness to animals and it shows the character has a softer side to them. It's a cheap way of adding depth to the character, but in doing so it makes the person feel more real.
The second is "kick the dog." It is basically the opposite. You show the character doing something cruel and unconscionable for next to no reason. This guy isn't just mean in a back stab and slit your throat kind of way. No, this guy kicks puppies. When done to a "good" character it can show that they're not as nice as they seem (and are totes about to betray you...) and when done to a bad guy generally is used to push them over the line from "bad person" to "evil guy that no way will I ever feel bad if he dies."
Kicking the dog isn't always a dog. It is just a way of describing an action that pushes the person over the line. In a New Hope Tarkin achieves the same effect when he casually and coldly breaks his word to Leia and orders Alderaan destroyed just to prove a point. It cements him as a horrific bad guy that we want to see dead and don't have to worry about our souls if and when we do get to watch him die.
In a lot of ways that is it. If you want someone to seem more human, show them doing something that isn't just mean and antagonistic to the PCs in your game. From the characters point of view, they're not evil and just doing the best they can, so what are they doing? For the opposite...well, just make them a cardboard cut out evil guy.
When To Humanize
I already discussed this a bit with the Star Wars paragraphs above, but the trick to knowing when to humanize is based on the kind of game you are running. If you are running a Black & White high fantasy game with a clear good guy and clear bad guy, you probably don't want to humanize the bad guys too much. Why? Because the world/game you are running does have real evil and that needs to be respected. Doing otherwise can break your players out of the game and that is counter to fun.
On the other hand, if you're going for a more nuanced game where you want people thinking about their actions, what they mean, and who their character is developing into, go nuts. Look at A Song of Ice and Fire. The books - and show - does a great job of jumping around perspectives throughout. We get to see characters are not always what they seem. We see bad people do good things. We see good people do bad things. Everyone is just...folks...and there are good and bad people on all sides. It is wonderful and nuanced and that is awesome.
Sometimes though, you don't want to handle all that mental load. Sometimes you just want to go "all orcs/goblins/hobgoblins/gremlins" are evil despicable creatures that can and should be killed with impunity. That isn't a bad thing. It's just a thing.
Whichever way you go, be careful if you try to go the opposite way. Once or twice it can be a powerful tool for effect or to show someone (a Pet the Dog moment in a black/white world can be a great way to foreshadow a heel-face turn's potential.)