Hello, I’m here to ask if anyone has made a GOAP open-source or has any material or “tutorial” to give me a reference on enemy systems. I want to improve on my AI in my boss fighting game and I dont want enemies to have a behavior that they dont move despite having a target, or that they spam moves while moving forward. I want smart enemies that calculate their target’s potential move combos and predict their moment (which is what I currently got in targets) and use states to tell the enemy what to do during this state. I just need reference material and I can go all by myself. Any help is appreciated
I found this article on Medium about “Goal-Oriented-Action-Planning”. It’s in C# but he explains it well.
Hope this helps!
1 Like
Oh, it certainly gave me an idea in the midst of reading. though this is merely an idea, what are yer thoughts?
local c = {}
c.Check = function(victim, boss)
local state = boss:GetState() -- ex: attacking
local victState = victim:GetState() -- ex: regenerating
local outsideVars = {
Distance
BossHealth
PredictedCombo
Invulnerable
}
if outsideVars.VictimInvulnerable and state == "Attacking" then
boss:SetState(Magnitude >= boss.WalkSpeed*5 and "FindNewEnemy" or "RunAway")
end
if victState == "Regenerating" and not outsideVars.VictimInvulnerable and state ~= "Attacking" or outsideVars.Invulnerable then
boss:SetState("Attacking")
end
end)
Yeah, I would say that is a pretty good idea. Making “GOAP” is a pain to do but will be worth it in the end!
Happy Coding!
2 Likes