Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / Dark AI - Need help with some AI problems

Author
Message
Chenak
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 3rd Oct 2008 00:36
Once in a while I attempt to get AI working on my game using Dark AI, however every attempt has yielded some kind of irritating problem to the point at which I always give up.

Basically it seems that dark AI is completely incapable of handling multiple enemies in melee combat range as they tend to jitter so much that its completely worthless. It also seems to me that dark AI is incapable of making npcs not jitter while they move basically making the enemy movements look unrealistic and generally terrible.

So is there a solution to any of these problems? It can't be just me as I have tested multiple settings across multiple computers and I still get rubbish results.

If I need to post an example I will but basically all I have is 3 generic enemies vs 1 npc with attack distances set to 64, avoid distance 32 and the radius set to 16.0. I also assumed there would be many people in the same situation as someone somewhere must have wanted melee combat in their game

Cheers
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 3rd Oct 2008 12:52
Are you using automatic mode or manual mode?

With automatic mode, you tend to get more jittery movement as the characters keep changing targets. Also, with melee especially, you will need to set the characters to manual mode. Automatic mode is definately designed for use with shooting games. Use
ai set entity can select targets entity,0
to make sure that your character cannot pick his own targets, then add targets to the character yourself. Turning off the character's ability to strafe
ai set entity can strafe entity,0
to stop the characters strafing. They tend to choose strafing way too much on manual mode, which is part of the problem I assume you're getting.

To be honest, I had similar issues with DarkAI as you, but I was using DAI in auto mode. Once I switched to manual mode, and started coding the AI myself and just using dark AI for the path finding, things were much less buggy. If you need any more help, just post back.
Best

Chenak
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 3rd Oct 2008 16:33
I'm using automatic mode yes. I could use manual but that would defeat the purpose of me using dark AI as I already have built a working pathfinding system which works better.

Dark AI promised to make AI easier which would reduce my coding time but so far its only irritated me and made things more complicated than I'd like.

Thanks but I have tried that method before and I still get rubbish jittering as the enemies get into melee range, basically 2 enemies get to the player position while the third tries to squeeze in between the two while the other enemies look bemused and stand there, the third ignores this and continues to attempt to barge in thus causing it to shake erratically.

This means I have to invent a method for enemies to attack certain locations around the player so they avoid each other but I simply refuse to as this bloody plugin is supposed to handle this

This is just poor. I hate to say this but I regret buying Dark AI now. So far it has been a complete waste of my time.
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 3rd Oct 2008 17:11
I had the same problem. It's because, as I said DAI doesn't consider there to be a limit to the number of times an individual entity can be a target, in a shooting game it wouldn't be a problem if 10 characters all targeted the same guy, but in melee it causes the problem you're talking about.

I would suggest that you have an boolean array for the characters, where 0 means the character is not a target and 1 means it is being targeted, then characters will only select a target if it's "istargeted" variable is 0. This should mean you can limit the number of entities targeting one character.

Dark AI does make AI easier, and auto mode is just a quick fix, if you want to get anywhere you will need to use manual mode.

sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 3rd Oct 2008 22:24
@ BOTB Developer

do you know any thing about DP with DAI?

I could use some help with this, I have given up on old projects becos of strang results.

I used DP`s character control with DAI it made a good physic based AI except for the fact that they climed over each othere, witch I though that it was be cos of the cc step mode, but I set the step value to less then 0.1 and still did it, any ideas?

soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
Butter fingers
18
Years of Service
User Offline
Joined: 20th Mar 2006
Location: Mecca
Posted: 3rd Oct 2008 23:30
Sindore,

Ha, well I wouldn't claim to be an expert by any means, but I am using it quite heavily in my current project, so I might be able to help, although I suspect there are many other (possibly better) people out there (BOTB for FPSC!)!

Right, by step mode I'm guessing you're talking about the avoid mode of dark AI?

I think the probelm you're having is the avoid radius of your characters in comparison to the size of their collision box. IE, the characters are bigger in the physics engine than dark AI thinks they are, so it moves entities closer than it should, and one pops up!

One solution is to increase the collision radius of dark AI,
AI set radius integer#

if that doesn't work, why not just disable vertical collisions with characters? make them a different collision group from the scenery, and exclude them from collision tests?

Hope that helps?

Chenak
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 4th Oct 2008 23:18
The entity avoidance system is remarkably bad. It is definately the avoidance system thats playing up causing the insane shaking. This is the reason why I bought the thing cause I hate setting up avoidance systems... grrr.

I've setup a system where an entity would go to various points around the player to make sure they wont collide, yet the bloody entities would still try to push each other away thus causing shaking and should anything attempt to to walk around this group they will attempt to walk straight through the lot thus causing more shaking and gahhh!
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 5th Oct 2008 00:02 Edited at: 5th Oct 2008 00:54
Butter fingers or any one here is a peace of code
which I`ve dug up form my rubbish code past, one or two hits would be nice make it better if you have the time.

thank in advance

edit

can you tell me why do the AI entity get bunched up when you use physic cc movement?

here is my code


soul sucking devils, twisted body of the damed, slivering slim drips from every poor, sin licking at your ears, and the smell stinging your eyes, and if you don't like it, get out of my kitchen!
Chenak
22
Years of Service
User Offline
Joined: 13th Sep 2002
Location: United Kingdom
Posted: 8th Oct 2008 05:23 Edited at: 8th Oct 2008 05:24
Well I definately consider the shaking problem a bug with the Dark AI avoidance system which is being too stupid and shaking when more that one entity is present. I hope it gets fixed but the creator hasn't updated it in a very long time.

Working on a work around basically using sparkies collision to make sure the entities don't get too close.

Login to post a reply

Server time is: 2024-11-24 21:44:20
Your offset time is: 2024-11-24 21:44:20