top of page

Minion AI and the Morphling Niche

  • Writer: Joses Kang
    Joses Kang
  • Jun 26, 2021
  • 1 min read

This is a Morphling. It's a minion that can be summoned by the Elemental Lord. For the minion to work, there were a lot of considerations to make. How will it be summoned? How will it cooldown?


Today I'll be talking about how I did the AI and special interaction for this minion.


As many of you may know, I like to practise efficiency with my code. Knowing that the core AI of the different class' minions would be the same, I started by making a script called BasicMinion. Later on, I would create subclasses of BasicMinion for the specialised interactions.


Here's a small illustration of the different zones that matter for the AI. When a player enters the Notice Zone, the minion will start following the player. If the minion gets close enough and has the player in its Attack Zone, it can deal melee damage to the player. If the player runs far enough and escapes the Forget Zone, the minion will forget that player and look for someone else to attack. Seems simple enough, right?


Here's where it gets interesting. Morphlings have the special ability to merge together and create a bigger, badder minion - the Morph King (name's being workshopped, I just liked the funny play on words haha).


I left this comment in my code for me (and any other developers) to understand. I think it'll help you understand how it works too!


Pretty big brain stuff to think of this, I know. Stay tuned for more!


コメント


logo_text.png

    ©2021  Golden Monkey Studios

    bottom of page