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 A.I. suitable for an RTS

Author
Message
Fa1con
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 24th Mar 2008 01:35
so i am looking to make an rts game and i was also looking at Dark A.I. i was reading about entities(i think thats it) and it said you could get dark A.I. to turn and move to the place where you wanetd it to go avoiding other objects. so does this mean i can make dark a.i. click on a guy then turn and move him avoiding other objetcs in his way? so basically i am just wondering if dark A.I. would help in movement and general construction of an RTS?

thanks,
culmor30
17
Years of Service
User Offline
Joined: 16th Jun 2007
Location: In my head.
Posted: 24th Mar 2008 02:34
Yep. You can set your entity to go from point A to point B etc, avoiding all obstacles in its path.
Fa1con
17
Years of Service
User Offline
Joined: 20th Aug 2007
Location:
Posted: 24th Mar 2008 02:56
great thats exactly what i wanted to hear, thanks a lot!
Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 25th Jun 2008 03:55
In my experience an RTS with Dark AI might be a bad idea as it only supports 3 teams, one of which won't fight (Neutral)

Mountain Dew, happyness in a bottle.
dagger24
16
Years of Service
User Offline
Joined: 25th Apr 2008
Location: Switzerland
Posted: 25th Jun 2008 07:31 Edited at: 25th Jun 2008 07:32
Quote: "In my experience an RTS with Dark AI might be a bad idea as it only supports 3 teams, one of which won't fight (Neutral)"


WRONG!

You can create a team of objects and assign them to the category of being an enemy. However, you ARE correct on their only being three TYPES of teams. However, as stated, you can have more than one enemy team type. etc.

Oh, and it is not cool to bump a three month old thread. That expires today. Unfortunately it now expires in September. Thanks a whole bunch.
Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 26th Jun 2008 09:13 Edited at: 26th Jun 2008 09:15
If I understand what your saying, then yes, you are correct. With a little manual code this that would be easy. But then the "enemy" teams cannot attack each other. So whats the point? There arn't many RTS games where ALL the AI players are against the computer. Granted there are some, but it definitely doesn't dominate the RTS gameplay styles.

And as to the resurection:

Mountain Dew, happyness in a bottle.
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 26th Jun 2008 22:24
The default settings of Dark AI are rather basic, but it's an excellent starting point for AI creation.

I made a RTS game with it and it worked marvelously. I created a team management system that pleased me in about a day. I have teams, and I can set who is hostile with who. When two opposing team members meet they are set to opposite teams. After they are done with each other they turn back into their original alignment. If there are several teams on screen at once they'll sort it out one target at a time.


Come see the WIP!
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 26th Jun 2008 23:29
Isn't it possible to force a unit into the target list? So in theory you should be able to have units designated as enemy attack each other with some manual code without even having to switch between ally and enemy (although that was by first guess at how to do it).

Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 27th Jun 2008 01:41
Quote: "I created a team management system that pleased me in about a day."


Any chance you might share some samples with us code hungry multiple-team AI deprived programers?

Mountain Dew, happyness in a bottle.
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 27th Jun 2008 05:18
I would look at the following two commands:


return integer = AI Get Entity Can See ( Entity Number, X#, Z#, Height )
AI Entity Add Target Entity Number, Target ID


It even suggests using these commands in the manual. You see, the best thing to do is cycle through each AI entity yourself, and make sure to keep unique team identifiers for each one. As you cycle through an ai entity, have another for loop that cycles through all ai entities except the current entity. Then use the AI GET ENTITY CAN SEE command on each one, along with a simple if statement to check if the team is different, and if both pass then use AI ENTITY ADD TARGET to add it to the target list.

I'm going to go modify the Teams demo to see if I can show it in action.

Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 27th Jun 2008 05:30
Here's a new version of the teams demo that shows a basic implementation of multiple teams. I added a third yellow team that will attack both green and red. I created them as enemies because they are hostile to the player - if they weren't I'd create them as allies.

While Curtis's idea probably works I think this method is better because it allows the AI system to prioritize the targets like it normally would. So if it's hostile to the player, it won't temporarily become an ally and therefore ignore you, but still attack you if it finds it neccassary. It also doesn't require all that much extra code.

So for those of you who wanted to have zombies that hate EVERYBODY...here ya go



Sunflash
19
Years of Service
User Offline
Joined: 28th Jun 2005
Location: Seattle, Wa
Posted: 27th Jun 2008 20:34 Edited at: 27th Jun 2008 22:53
Wow! That looks great Airslide
Your modifications will actually be able to slip RIGHT into my code, as everything you need to tell whose on whose team is already in place. My project is using a binary tree to keep track of all the "tribal members" so I'll be using recursion to work this out. So all in all, I should be able to get a speed boost.

I'll be posting my finished code in the Recursion Challenge thread when I'm finished too.

EDIT:
Sweet, I finished about 45 minutes ago! Everything works amazingly, thanks again for the code samples! I now have up to 30 teams battling with each other

Mountain Dew, happyness in a bottle.
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 27th Jun 2008 22:56
Airslide thats a good mod of a AI demo.

is it ok if I add this post to my physic & AI challenge post?

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!
sindore
20
Years of Service
User Offline
Joined: 2nd Jul 2004
Location: Bedfordshire, UK
Posted: 27th Jun 2008 22:57 Edited at: 27th Jun 2008 22:59
Airslide thats a good mod of a AI demo.

is it ok if I add a link to this post, for my physic & AI challenge post?

edit

sorry I posted more then once.

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!
Airslide
20
Years of Service
User Offline
Joined: 18th Oct 2004
Location: California
Posted: 27th Jun 2008 23:11
Quote: "is it ok if I add a link to this post, for my physic & AI challenge post?
"


Sure. I didn't actually add all that much but I guess it's a decent resource.

Login to post a reply

Server time is: 2024-11-24 23:47:48
Your offset time is: 2024-11-24 23:47:48