Thursday, April 17, 2014

The Truth about NPCs!

Have you ever felt good about defeating a high level NPC? Wanna brag about it to all your friends? Well, sorry to to rain on your parade, but you didn't actually defeat him in a fair match.

What!!!!

Yep. You heard me. He let you win. And he could have killed you EASY. But he was programmed to fail. The programs set it to not win, to cede to you. This is a computer your facing. Unless told to, it doesn't make mistakes. Take it like this. Say you slayed the Ender Dragon in Minecraft. You might feel proud about that. But you have to remember that your fighting a computer. They can make whatever they want happen. It could make the Enderdragon immortal, make you powerless, make it one shot you, make creepers fly through the wall, you name it. In fact, it could just kill you, and you not do anything, or crash your m
Minecraft. 

Recently, I've been working on the program for a soccer game. Everything seemed easy and a breeze, until I tried to program an NPC. It's easy to program it to win everything or lose everything, but it is hard to find a balance. You can program it to always go to defend the goal once the ball reaches the point were it can be shot so the other side never gets a point, or you can program it to always leave the goal open and never defend. So in the end, what you have to do is tell it to score and be boss, like, 50% of the time, and leave the goal open or give you a window of opportunity 50% of the time. So NPCs are literally made to fail and not do there best. 

The next time you defeat a high level boss and want to go brag to your friends, just remember he didn't give it his all. And that's why I always prefer multiplayer. 

No comments:

Post a Comment