Hello,

I've finally gotten to the point in my game where I need to start working on the A.I. (both decision-making and movement A.I).

This is for a 2D top down game with real time combat. (Similar to Star Ocean/Tales series)

Based on the default script limitations in Ork (only leveraging XZ axis rather than XY), i've come to learn that in order to implement my own Move AI that Ork understands is to include a custom piece that contains three methods:

One for Speed method

One for Position method

One for Stop method

I come from a ruby webdev background so I'm still learning some of the nuances of C# and Unity (mostly syntax and unity API).

My questions are: How much responsibility does Ork handle in a custom move A.I.? How are those above methods meant to be implemented?

For clarification:

Do I need to write a script that covers the hunt and flee mechanics as well? Or will Ork handle those and I only need to write something that provides the three methods?

Is there a way that I can access the default ork move A.I. script and try to understand how it's written so that I can alter it to handle XY axis movement?

Is that necessary?

The mechanic would be simple as monsters would target enemies via Battle A.I. settings and target location allocation would be handled by locating the nearest "Player" tag.

I suppose the only thing need to handle is "pathfinding" but I believe that it can be done with a third party component like PolyNav2D where I can define certain objects as "obstacles" like trees or other hazards.

If i'm not speaking clearly, I'll be sure to clarify haha. At this point, I think I've gone insane from studying A.I. and A* pathfinding hahaha!
  • If it makes sense to give an example:

    I'm developing an MVP for the battle system and testing a singe battle with three monsters.

    One is healing slime, two is warrior slime, three is magic slime.

    Healing slime will chose to avoid being within a set distance of enemies while healing its allied slimes.

    Warrior slime will simply choose a random target to attack and move towards that target.

    Magic slime will move towards the chosen target and maintain a set distance from that target to cast spells.

    Healing and Magic slime will generally avoid the player and player party characters when they aren't executing an action, but will be vulnerable while casting an ability. (Since casting a skill requires the caster to be still while channeling)
  • ORK's move AI scripts handle all those checks for you - the 3 functions you need to implement are used to let your movement component know where to move to, at what speed and make it stop.

    I.e. all your script needs to handle is the actual movement of the game object, the rest is handled by the move AI.

    The move AI's scripts are available in the full version of ORK and you can change them, if needed.
    If you're enjoying my products, updates and support, please consider supporting me on patreon.com!
  • Ah okay! I'll see if I can find them and learn from them.

    Thanks a bunch!
Sign In or Register to comment.