3D Rad - Free 3D game maker - Forum

This forum is now archived!

This forum is locked, and is a read-only version. A new community-ran forum can be found at classdev.net

News:

The 3DRad community can be found at classdev.net.

Pages: [1]

Author Topic: GenericAI - New object please.  (Read 1637 times)

« on: September 18, 2009, 11:05:04 PM »
We have carai but no botai or character-ai or what ever it maybe. We have projectiles and soon the scanner object, but there is no AI object for character and animals and what not. So please implement a Generic-AI object that can be used for any kind of situation. Its purpose would be to follow paths and scattered waypoints, and targets. It would be upto the level designer or scripter how he uses the information.

Wether there is scope for adding the carai like ai in addition to the above suggestion should be disscused further. As the behaviour needed for genericAI and carAI are totally different so this should be discussed in broader perspective.
« Reply #1 on: September 23, 2009, 06:06:29 AM »
I think we need some 3-4 basic typed of AI to play with. Just to see how they are coded and to adjust them to fit our needs.
FPS game creator for 3drad and >2000 games GamesAtNight
« Reply #2 on: September 23, 2009, 09:44:51 AM »
Character AI, even basic, is extremely difficut to provide as a no-scripting object. The goal isn't impossible though. As long as I have a clear idea on what exactly the AI should do to respond to specific situations, I can implement it.

For an interesting discussion about AI, please see

http://www.3drad.com/forum/index.php?topic=1557.0

« Reply #3 on: September 23, 2009, 11:50:02 AM »
What about my A* pathfinding?
http://www.3drad.com/forum/index.php?topic=2568.0
No one seem to use it  :'(

It isn't hard to add More AI to it, all you have to do is add informations on nodes:
Door nodes, Hiding nodes...
And if you want I can even give you a little script to give vision to your bots and another one to smooth the curves on the path.

In fact I was hopping to see other people build on it to make more things.

Ed

« Reply #4 on: September 23, 2009, 09:45:03 PM »
Hi!

I just registered to the forum to give my quick 2-cents on this topic.

I'd like to appeal for a simple yet robust A* / Dijkstra pathfinfing object instead of a full-
blown AI object (at least for the time being).

I believe a robust pathfinding object (preferably with dynamic obstacle avoidance) is much
more difficult for us non-coders to implement well in script than a set of simple AI routines
(which probably can't be reduced to a 3dRad object anyways).

The one thing I've really been missing in 3dRad is a relatively easy to use generic
pathfinding soultion. This object would improve the quality our games (FPS, RTS,
roleplaying, etc.) immediately.

I beleive that with the help of the 3dRad gurus we can figure out a decent and flexible
scripted AI solution. So I'd like to come out very strongly in favor of a robust Pathfinding
solution before even talking about a full-blown AI object.

A workable pathfinding object is something i can see myself donating to.

@IronF,
I really appreciate your hard work creating your A* pathfinding project.

Unfortunately for myself I had two problems with it:

1. As a non-coder (i'm willing to try to learn but i'm far from mastering even the basics) i
   found it very difficult to comprehend the script well enough to 'dig in' and start creating
   something usefull. I can't see myself learning AngelScript well enough to do something
   interesting for many months to come and i'd like to have relatively easy pathfinding
   available as soon as possible, i.e., i'd like to get that out of the way from a technical
   standpoint and not struggle with it more than is necessary (in script).

2. About the last A* project you released: I noticed just a couple days ago that if you
   click on the ground by a corner wall section perpendicular to wherever Andro is,
   the algorythm almost always 'skips' the nearest waypoint sending andro directly
   towards the target spot. This causes andro to walk against the wall as he tries to
   go directly towards the target spot.

Sorry to sound negative but pathfinding has to be reliable to avoid dissapointing the
player.

Maybe these technical problems can be fixed, but, as a non-coder, i am left somewhat
lost and unable to precede further with projects.


« Reply #5 on: September 24, 2009, 04:11:20 AM »
I think several sample projects would do OK. With a lot of instructions, so even code noobs can understand the code and how to modify it. It would be a good lesson on coding  ;)
FPS game creator for 3drad and >2000 games GamesAtNight
« Reply #6 on: September 24, 2009, 04:16:48 AM »
@Ed
1. I understand your difficulty, and totally agree that an A* object with "path editor" would be easier to use.

2. Thanks for pointing that out, it's due to my quick and dirty way of refining the path :)
There are better ways to do it, but I just skipped that part forgeting about non-coders :(
The problem is: you'll need to create that part of the script with an A* object...
*I just updated the demo to add some obstacle vision to the bot and only launch A* when needed. :)

On the impossibility to do an universal "pathfinding object with dynamic obstacle avoidance", let say you want to make a Warcraft type of game:
A good AI would avoid the enemy areas when you want your troops to search for some wood to cut.
How will you achieve that without changing the cost of the path under enemy control with a script?

The beauty of A* is that you can change the cost of each node of the path (Higher cost when crossing a river, or a street or one path cost for Orcs, one for humans), you can make multilevel path finding (a path from town to town, another from house to house all linked together...), you can add properties to your nodes (skipable, open...), you can add AI to your nodes(Stop and check if a car is approaching before crossing the street)...
You wont be able to do that with a "generic A* Pathfinding" Object.

I'll do another sample with pieces of AI in it and English comments later... :)
« Last Edit: September 24, 2009, 03:52:34 PM by IronF »

Ed

« Reply #7 on: September 24, 2009, 05:23:31 PM »
@Daniel Cremers,

Yup, that would help greatly!

I'd like to see some scripting gurus apply their own expertise to IronF's A* project and
help take some of the load off IronF's shoulders :)



@IronF,

Many good points well taken :)

I think i understand what you're saying about 'changing cost, etc.' although i'm not sure
a dedicated pathfinding object (perhaps in conjunction with some scripting) couldn't
answer that problem. I honestly don't know!

Anyways, you have considerable experience with A* so i'll defer to your judgment :)

Anything that gives us good pathfinding / AI is a boon to all 3dRad users so i appreciate
everyones efforts on the matter :)



« Reply #8 on: September 24, 2009, 10:32:33 PM »
IRonF your solution is for temporary period. Not everybody is going to adjust the script and that too for every entity. Because its not global to the rad way of working.

AS stated earlier by me:
Quote
Its purpose would be to follow paths and scattered waypoints, and targets. It would be upto the level designer or scripter how he uses the information.

ED :
Quote
a robust pathfinding object (preferably with dynamic obstacle avoidance)

What I wolud suggest is a pathfinding object using waypoints- which could be assigned extra info attached to them in property window, and  any other movebale rigidbody that is linked to this object. The purpose of this object will be to find the shortest path to it. The linked script can then trigger this object when its need to, then can retrive info from the IN_$$ to navigate.

AI behaviour is another thing that builds upon this object. And that can be scripted using individual interest and project needs.

And there can be more than one of this object having different waypoints and objects and scripts linked to it.

Pages: [1]