Hi. Bit of back-story: I'm working on a sort of RTS/RPG game built in Unity. I already took a stab at it ages ago ( https://github.com/mathiassiig/Necromatic ) but eventually gave up/lost interest. Now I'm going to try making the same game again, but this approaching it from a different point of view. I'll be trying to just get the essence of the game rolling and work on all the graphics and juicing later.
So, to the question. I need some sophisticated AI in my game. I'm just doing this in my free time, so I need a free or cheap solution for this. Time isn't exactly an issue but if I can avoid reinventing the wheel, that's great. Some people have been mentioning behaviour trees, I found an asset but it was like 80€. It's not a shit-ton of money but if it doesn't suit my use-case, then it's a waste. The AI would be sort of close to units in for example Warcraft 3, but with more functionality. So I'm looking for tips and tricks here, anything appreciated.
https://www.youtube.com/watch?v=OmoKw1ikAi8
Honestly holistic 3d is one of the only channels that I've found really explains AI in a way that I understand. I highly recommend going through their videos on using the Unity Navmesh. It's simplistic but it'll get you going - you can easily add more complexity if needed.
There are a couple of ways to go about it but often it boils down to two choices based on what you want.
If you want a Rimworld / Dwarf Fortress type of AI where each AI character has its own "wants and needs" and plans around that, then you are looking for a Goal Oriented Action Planning system https://gamedevelopment.tutsplus.com/tutorials/goal-oriented-action-planning-for-a-smarter-ai--cms-20793
If you want a more deterministic AI system where your AI characters are moving around doing what you have told them to do from a graph, then you are looking to implement a Finite State Machine
https://gamedevelopment.tutsplus.com/tutorials/finite-state-machines-theory-and-implementation--gamedev-11867
https://unity3d.com/learn/tutorials/topics/navigation/finite-state-ai-delegate-pattern
https://assetstore.unity.com/packages/tools/visual-scripting/apex-utility-ai-personal-edition-56306
This is a plugin I'd personally go for if you want a powerful system in your game.
If you want a free or cheap solution to this then I don't know about any plugins. The asset store is probably filled with shitty solutions. Finite State Machines are easy to write yourself if you want a simple solution.
I'd want to invest some money in a good AI solution like Apex. That plugin is cheap compared to the time and resources a company would spend writing their own. It's even properly load balanced, which is a major selling point as well.
Thanks guys. I think I'll go for implementing my own FSM for now, and if the game gets good enough and that gets too unmaintainable, I'll switch to something like Apex
I've been using Panda Behaviour for my game, it's probably not the best way to do AI but it's free and it lets you just write simple C# logic then compose it into different tree structures, it's been pretty good for me, a little weird at first but any issues I've had has usually been me not understanding it right rather than anything to do with it
Sorry, you need to Log In to post a reply to this thread.