TheGameCreators / GameGuruRepo

The GameGuru Repository For Community Collaboration
http://www.game-guru.com
137 stars 56 forks source link

GameGuru MAX - Request - Enemy AI - Random Dodging and Taking Cover #2804

Open MonkeyFrogStudio opened 2 years ago

MonkeyFrogStudio commented 2 years ago

I'd like to request that the enemy have built in to their AI that they sometimes have a few random movements when attacking, such as some unexpected movement, like dodging to the right or left as if they are expecting you to attack them, instead of just blindly moving toward the player, attacking. Maybe a duck, or a roll out of the way, etc. I remember when I first encountered stuff like this way back in the first Unreal game. Why not add something like this here?

Secondly, I'd like to see the enemy take cover when being shot at, when someone near them is shot, or when a barrel explodes near them, etc. Right now, they often don't react, especially if the player is far away when they shoot at them.

MonkeyFrogStudio commented 2 years ago

Would it be possible to have the enemy detect COLLISION SHAPES so they could determine if they could use them for cover? That way they could "differentiate" between an ammo box (too small to take cover behind) and a Jeep (plenty big enough) and, thus, run for possible cover when fired upon?

Necrym59 commented 2 years ago

I think its reaching the point now where they need a seperate AI director program, a DLL that would handle all the AI ouside of the main program that can be expanded upon via the behaviours, they are going to come realize this as more and more AI behaviour augmentation/decisions are needed. There is only so far they can go without slowing things down at present in the main program.

MonkeyFrogStudio commented 2 years ago

Perhaps. However, the base AI we have now is ... okay. We need the base AI to work well. To me, that means that they attack (that part seems to be working well) and react somewhat to what's going on around them. Right now, it only seems they react to seeing/hearing the player within their cone. Other than that, they don't react to anything else ... exploding barrels, shots fired near them, etc. As a result, they look ... dumb ... and are easy to kill. It should be easy ... and not too intensive ... to add in a little random movement to make them harder to hit. After all, as pointed out, they were doing this back in the first Unreal game back in in the 90s. ;)

Necrym59 commented 2 years ago

Thats true but a lot has changed since those days too, behavior trees are only part of AI, functional but limited. AI is also going to be needed for NPC's of various types, especialyyif they are going to expand to RPG as well, decision trees are going to be needed based on personalities sooner or later, not just behaviours, and that is where it becomes intensive because personality dictates what behaviour tree to use and when. This can have a huge effect on a programs functionality if its handling other processes, you are already seening hickups and slowdowns now with the simple behaviour choices which in themselves do pretty damn well.

MonkeyFrogStudio commented 2 years ago

True, but remember, we already have a division here ... this is AI based on the enemy AI Behavior. So, it's already tied to a Behavior in MAX, isn't it ... at least to some degree? So, perhaps what we are doing is developing the Shooter AI. ;)

Necrym59 commented 2 years ago

I agree behaviours are pretty much simple and good enough for shooters, it just as you say needs some more tweaks of combat mode. I do think they need to start implementing a personality trait though which creates randomness eg: tactical - runs and hides to shoot, aggressive - full on attack, timid - call backup set off alarms etc. but well wait and see where it goes.

MonkeyFrogStudio commented 2 years ago

Yeah, I totally agree with that. I'd love to be able to assign a personality Behavior to my NPCs ... or have sliders/checkboxes/dropdowns for things like how timid/aggressive, how stealthy, etc. ... anything that would make one character different from another in some form or fashion.

Necrym59 commented 2 years ago

Yeah i did some work on behavoural intelligence systems when doing work for paraplegic automation and robotic assistance and using personality traits make a huge difference to behaviour trees systems im not sure its been implemented in games so much but it should be. When the decisions an AI makes is based upon his traits it makes for really interesting interactions and totally makes them more life like, and the games dont play the same way twice which is great as now they are the same regarrdless. At the moment we have Condition>Response as a Behaviour. But if we have Condition>Personality>Response it opens up a myriad of options for the bahaviour tree. Think of it as weighted descision making.