Hello, everyone! The last two weeks were almost entirely devoted to enemy intelligence. It was a massive task. And I’m gonna tell you EVERYTHING.

I woke up at the first day and started gathering information about moving characters on predetermined paths. Within a day or two, I fully accepted the sad fact that there is no Godot plugin for this task in a 2D platformer. All built-in path features were very limited as well.

Needless to say, it took a lot of time and effort to build my own system to move an enemy robot around. I rebuilt its movement two or three times, tripled the size of its behavior tree, and built my first “tool” to help manage waypoints. Yes, I had to create my own waypoints. (I have to add that this system will work with future NPCs like a charm)

In a week and a half, the enemy robot was walking and jumping around using the most efficient ways. To my huge joy. So, let me tell you about the system I made:

  • Enemy patrols any territory you tell him to guard.
  • He will shoot the player if he sees or “feels” him. (You need to touch or stand close for the “feel” part)
  • The enemy will chase the player. He will also rush toward the player if he is hit by an arrow from far away.
  • And if he sees a flying arrow, he will rush to the place where it landed to investigate.
  • If the player is nowhere to be seen for a long time (“must be the wind” case), the enemy will resume patrolling as if nothing ever happened.
  • It’s nothing serious, but he stops shooting when the player “dies.” A rare detail in modern games. For some mysterious reason.

I don’t think such complex behavior is necessary in a porn game. However, I wanted to spend a couple of weeks making the enemies look “real” and somewhat smart. After all, players will be fucking them, right? [No more abandoned projects]

3
1