|
|
Re: Intense Pathfinding 2
[Re: Orange Brat]
#187408
03/10/08 19:35
03/10/08 19:35
|
Joined: Oct 2003
Posts: 4,131
Matt_Aufderheide
Expert
|
Expert
Joined: Oct 2003
Posts: 4,131
|
Quote:
The walking off of buildings thing is a feature and can be limited by setting a value.
OK sorry, but its a bit odd that the demo highlights this aspect when it looks like a bug.
Quote:
The only time I can get them stuck is if you walk under the stairs. That's a fairly old one and was in the first version.
This happened the first time i clicked on a guy and gave him a destination. Which is odd becasue A* is path-perfect.
|
|
|
Re: Intense Pathfinding 2
[Re: DestroyTheRunner]
#187409
03/10/08 20:34
03/10/08 20:34
|
Joined: Jul 2004
Posts: 1,205 Greece
LarryLaffer
OP
Serious User
|
OP
Serious User
Joined: Jul 2004
Posts: 1,205
Greece
|
Hello everyone! Thank you for all your responses! I'm very happy when i see that people actually use my software and get some feedback on it. Keep em coming, and when someone has any screens to show from his game, you can post it here as well. Quote:
But i couldn't get the Source Demo to start.
Make sure you're using A7.07 OR the very latest beta (A7.081b). That's the only versions that I've verified that IP2 works successfully on.
Quote:
Now I`m a bit confused because IntenseX is a game builder extension for GStudio (I think) of that one part is the Intense AI. Is it possible to create a Bot AI with IntenseX that is implementable in our game without using the other features? Or would you recomment to script our own AI script on the base of Intense Pathfinding? We want to spend as little time as possible to get a functional bot AI.
If you want to spend as little time as possible on AI, then IntenseX is for you. IntenseX is not intrusive so when u include it to your game, there will be absolutely no change. You can then manually select which features of IntenseX you want to use, like AI, and leave others that you are not interested in.. All this is done in WED, but IntenseX is open source, in case you want to change the AI code yourself. Intense Pathfinding has nothing to do with AI; it's only a navigational method.
Quote:
Apropos, why is there a limit of 999 Nodes?
To suggest that you shouldn't go higher. If you've hit the 999 limit, it means that you're either placing waypoints wrong, or you're using ridiculously huge levels. I'm using IP2 for a commercial game, and i never had to go above 300. Waypoints have a O(n^2) complexity; in other words, it's necessary to test every node in the graph against all others in order to determine whether it's possible to place an edge between them, and 999*999 edges could take a lot of time for the graph to compile.
Quote:
in a previous version, rotation were much more smoother... why you make them rougher?
Just change their turn speed back to 80 in the is_ai_Npc_f() action. You might need to change the obstacle avoidance settings inside 'IntensePathfinding2.c' to force Npcs to begin avoiding dynamic obstacles earlier, to comply with their slower turning speed.
Code:
//Maximum distance that will consider near dynamic obstacles //When trying to avoid them using Obstacle Avoidance #define cGetRepulsion_Default_MaxDistance 2 //(in meters)
//How 'rough' it will try to avoid a dynamic entity using obstacle avoidance //High Values: Ensures the obstacle is avoided in time //Low Values: Makes up for smoother non-robotic paths #define cGetRepulsion_Magnitude_factor 200
//Maximum value set for the value above. Same guidelines apply for high and low values #define cGetRepulsion_Max_Magnitude 3
Quote:
From the code I saw that you actually drop the entity to the ground during the movement-calculations. Now this creates problems. I often saw the entities get stuck on terrain, even when I saw no edge sticking out.
It would be better to not see the entity as the "whole body" of the person getting moved, but see it only as the torso+head. The legs are the most flexible part, when a human moves, and can adapt very dynamically to the underground.
From several test I found that the best movement can be realized, when you take the "legs" as as representing a "dynamic space" between the ground and the torso. Technicall speaking: the torso float above the ground, trying to keep a certain distance aboce the ground. This hight is flexible (in reality done by legmovement), and can freely balance within a certain space.
now the torso never collides with the gorund, and can thus never get stuck on little steps under it. (in my last shootermovement demo i put that method in)
But you need to seperate the collionspace of the moved person from the displayed entity. The part that the user can see is then passable, and the collisionpart is realized by an invisible collisionentity.
The same basic method I used for the space in horizontal direction, to avoid getting stuck at corners.
by using a seperate collisionentity you can also smooth out the pan of the entity making it shake less rapitly, when adjusting the way (like running around another player).
If your humanoid models get stuck on rough terrain, then you're not using c_move correctly. There's absolutely no need to force IP2 users to make invisible torso-head models. If you ever saw an npc in the IP2 demo that stopped moving, it means that the dynamic avoidance failed to avoid an obstacle(usually happens when you mass-order units, never when u order a single unit, apart from that stairs thing OB mentioned). Please remember than I'm giving away a pathfinding solution, not AI. If the AI receives a raised flag that the dynamic obstacle avoidance failed, it can trigger a new long-term pathfinding request and get the npc started again.
Dynamic obstacle algorithms are best-effort and cannot always guarantee success. It's used for 'avoiding' small obstacles, not big complex ones or many small ones that set up long 'walls'.
Quote:
when you try to let the entities run to the brigde between the two buildings some of them fall down and loose their minds say, they run against the walls until you give them a new command.
maybe you already know this?
Quote:
Quote:
If multiple Npcs are commanded to move to one location, they will rarely make it all there. This is a normal limitation of A*+Obstacle avoidance and nothing can be done to fix it.
This doesnt sound right to me...other games dont have this problem.. seem more like a a limitation of the current code.
if you say so... me, paul tozour(thief 3), jeff orkin(fear) and mat buckland(ai-junkie.com) beg to differ.
Imagine that a game character is walking along a path and suddenly realizes it's about to bump into a barrel. at this point, it needs to be able to ask the search space: should I dodge left or right? Many search space representations cannot answer this question. They only contain information about how characters would walk in an empty environment that does not contain enormous quantities of crates, barrels, tables, chairs, lamps, vehicles, robots, and other dynamic objects. This is a particular problem with search space representations based on waypoints, such as corner graphs and waypoint graphs. These representations usually can provide little or no information to local pathfinding or obstacle avoidance system when it needs to creatively avoid an unexpected obstacle. -Paul Tozour
I'll try to explain what that means a little... I can understand why people can get dissapointed that IP2 fails there, but there's nothing else to be done. Efficient avoiding of dynamic obstacles can only be done using NavMeshes or a grid-system. IP2 needs to work for both grid games(starcraft, diablo) and non-grid games (quake3, monkey island 4), so there's nothing that can be done.. sorry. 'Other' non-grid games that don't use NavMeshes, just take care not to use many dynamic obstacles to screw everything up. And I've got this information from the horses mouth itself.
So.. try to visualize this: an npc is walking from point X to point Y. Unfortunately, the player has moved a barrel directly into the Npc's path. Because our waypoint graph is entirely pregenerated and therefore static there's no way we could have known about the barrel.

Assume that our Npc is a small monster that has no hands and therefore cannot push the barrel out of the way. How can he avoid the barrel?
In this case there's just not enough information to determine whether to go around the barrel to the left or to the right. The waypoint graph doesn't have any data to warn us about the spike-filled pit on the south side of the path. It knows about a bunch of nodes and a number of edges between them, but it knows nothing about the game world outside of that set of points and lines. We can try to compensate by using c_traces at run-time against the game world to see which direction is best, but this will still be problematic since c_traces will have a hard time noticing the existence of the pit unless we use it very carefully. In general, only navigation meshes and grid bases representations tend to provide the most information about the walkable surfaces in the game world.
Quote:
...anyway..guys always just walk off buildings instead of following the appropriate pathways..is this intentional? if so its makes no sense.
why doesn't it make sense? walking off buildings may lead to a shorter path than finding the stairs. When I play quake3, i rarely use the stairs, and I expect bots to do the same.
If you're doing an adventure game, you can change this from IntensePathfinding.c
Code:
//How far below is the NPCs willing to fall down. Sometimes a jump down a bridge would result in the shortest path //However, the NPC may take damage when falling from big distances so it might prefer taking the long route instead. //Higher values will allow the NPC to take the shortest route possible //Lower values will force the NPC to look for the safest passage(walk down the stairs, instead of falling down a cliff) //is_ai_MaximumFall can't be a bigger value than is_ai_DownwardsTrace var is_ai_MaximumFall=500; //in quants
Quote:
Also, they seem to get stuck more often than not...
Why distribute a demo when it doesnt work?
I guess I can't please everyone. I still hope I've answered all your questions though.
Quote:
Another general Problem is, that the moving unit will get blocked by a pack of other unit.
Whenever you place 5 units on the field, and let a unit try to move "trough" them, the usit will most likely not make it. I solved this problem, by making the unit "push" other units, that are willing to move. So you can push your own units, that have to walk command to the side. if the pushed unit know it will not fall down somewhere, it moves. The movement is the angle into the opposite direction of the normal of the collisionvector between both units tangent point of the circular (cylindrical) collision mesh. eg: the same as Billiard balls move in collisions...
A few games that can't cope well with dynamic obstacles (no navmesh or grid) have used this as a workaround as well, like The Thing(they cheated by making all Npcs passable, then had the pushed Npcs also step-away if possible, for effect). However, this is out of the scope of Pathfinding, and belongs in AI(it is very bad code to have your pathfinding force another npc to do something. The Ai of the walking npc must 'ask' the other npc if it could step away, and according to the decision making of the other npc, it may or may not step away by triggering its pathfinding system on its own). Mother's Den shows how IntenseX uses 'Intense Pathfinding 2' and 'Intense Ai' to cope with dynamic obstacles efficiently. You won't find any Npcs getting stuck there..
Quote:
i never tried the earlier versions of Intense Pathfinding is there a one that works at A6.x ?
Yes, Intense Pathfinding 1.03
Quote:
Quote:
The walking off of buildings thing is a feature and can be limited by setting a value.
OK sorry, but its a bit odd that the demo highlights this aspect when it looks like a bug.
I liked it better this way(i explained why), but i can default it to always-choosing-stairs if more people feel the same way..
Quote:
The only time I can get them stuck is if you walk under the stairs. That's a fairly old one and was in the first version.
To fix this, you can always move the waypoints further away from the stairs. This is indeed a bug, but i never thought it was too much of a big deal to fix it. It only seems to happen in floating staircases like that one(in realistic levels, there's cement underneath)
Quote:
This happened the first time i clicked on a guy and gave him a destination. Which is odd becasue A* is path-perfect.
This has nothing to do with A* which is only a subpart of a pathfinding algorithm. It's the search space that messes up. And fyi, A* is best-effort, not path-perfect.
Thank you all for your replies.
Cheers, Aris
|
|
|
Re: Intense Pathfinding 2
[Re: LarryLaffer]
#187410
03/10/08 20:56
03/10/08 20:56
|
Anonymous
Unregistered
|
Anonymous
Unregistered
|
Quote:
Make sure you're using A7.07 OR the very latest beta (A7.081b). That's the only versions that I've verified that IP2 works successfully on.
I use 7.07 but every times when the white window appears, is stops. nothing happens. The .exe Demo works great.
|
|
|
Re: Intense Pathfinding 2
[Re: ]
#187411
03/10/08 22:15
03/10/08 22:15
|
Joined: Jan 2003
Posts: 4,305
Damocles
Expert
|
Expert
Joined: Jan 2003
Posts: 4,305
|
For the problem with getting stuck on the terrain, I fully reference the demo you provided. I had multiple instancies where the entites got stuck either on the terrain(?), on a corner or at the walls in the labyrinth.
Since it is your executable, it can be related to altered code. it can either be related to the FPS (fps_max), wich is rather faster than slower on my computer, or you did not test it in this compiled demo.
I totally respect that you give your pathfinding sources to the public. I just want to remind, that there are still flaws in the path-following routines/physics (not the pathfinding, wich works fine), that should be adressed, as I-Pathfinding is part of your package.
|
|
|
Re: Intense Pathfinding 2
[Re: LarryLaffer]
#187413
03/12/08 22:06
03/12/08 22:06
|
Joined: Aug 2002
Posts: 673 Las Cruces, NM
JimFox
User
|
User
Joined: Aug 2002
Posts: 673
Las Cruces, NM
|
Hi Aris, I think I am on a different page than most. For my purposes, the problem of NPC interaction can be handled by NPC code, so I am not worried about that. The jumping can be adjusted by changing a value, so that does not worry me. I would never build stairs like that, anyway, so I can't be too concerned there, either. My conclusion is that this is a very nice code package. It is bulletproof, as near as I can tell, and runs fast. Your work is very professional, as usual, and I am very thankful to have it.
I do have a very basic question about how to use it in a first person shooter. Obviously, you can't click on the floor and have a NPC move there in that kind of game -- or at least I wouldn't. What is the best way to have the game events function generate a destination point for a NPC?
Thanks,
Jim
|
|
|
Re: Intense Pathfinding 2
[Re: JimFox]
#187414
03/17/08 18:59
03/17/08 18:59
|
Joined: Oct 2006
Posts: 106
i_program_games
Member
|
Member
Joined: Oct 2006
Posts: 106
|
Good stuff Larry. So I take it as opposed to using NavMeshes or a grid-system you'll have AI (via IntenseAI) handle difficult path finding cases.
Chaos is a paradox consistently inconsistent.
|
|
|
Re: Intense Pathfinding 2
[Re: i_program_games]
#187415
03/17/08 19:36
03/17/08 19:36
|
Joined: Jan 2008
Posts: 1,580
Blade280891
Serious User
|
Serious User
Joined: Jan 2008
Posts: 1,580
|
How do i use the intense pathfinding in a level i have already made? i couldn't find it in the manual.
My Avatar Randomness V2"Someone get me to the doctor, and someone call the nurse And someone buy me roses, and someone burned the church"
|
|
|
Re: Intense Pathfinding 2
[Re: Blade280891]
#187416
03/29/08 14:58
03/29/08 14:58
|
Joined: Jul 2004
Posts: 1,205 Greece
LarryLaffer
OP
Serious User
|
OP
Serious User
Joined: Jul 2004
Posts: 1,205
Greece
|
Hello again everyone, Sorry for the very late reply. I barely get the time to check on the forums anymore. Quote:
I use 7.07 but every times when the white window appears, is stops. nothing happens. The .exe Demo works great.
Well, you're not giving me much to work on here... Are you sure you get no error messages or anything? How many sections of dots appear on your white window(the total is three, each one standing for a different compilation pass). If nothing else, try including Intense Pathfinding source files to your own project, and see if that works..
Quote:
For the problem with getting stuck on the terrain, I fully reference the demo you provided. I had multiple instancies where the entites got stuck either on the terrain(?), on a corner or at the walls in the labyrinth.
Since it is your executable, it can be related to altered code. it can either be related to the FPS (fps_max), wich is rather faster than slower on my computer, or you did not test it in this compiled demo.
I totally respect that you give your pathfinding sources to the public. I just want to remind, that there are still flaws in the path-following routines/physics (not the pathfinding, wich works fine), that should be adressed, as I-Pathfinding is part of your package.
No, I doubt this is due to fps times I know what you're referring to, but I've explained this before. It's on my first post, "If you select multiple units to move somewhere, they will barely all make it there". This problem has NOTHING to do with terrain, pathfollowing routines and physics. When you're dealing with crowds, a simple obstacle avoidance technique isn't enough to move 20 people from one spot in another one. There's books upon books trying to deal with the behavior of entities moving in groups. For example, I'm very sure you're aware of Craig Reynolds and his Boids, which would tackle some of the problems in IP2.(Craig says, when in groups, don't try to constantly avoid your peeps since u share a similar destination point, like it happens in my demo... Instead, use three simple rules (Separation, Alignment, Cohesion) to move together as a flock. If you want to implement something like this in IP2 or your own pathfinding system, i'd love to hear more from you. But until that time, the limitations on my first post are standing. What I'm offering is Global Pathfinding and a solid obstacle avoidance system, not flocking behaviors.. I'm afraid you'll have to pay for that when IntenseX Gold is released (that's the third edition and will support the making of RTS games).
Quote:
While anytime someone says "nothing" can be done I assume this is wrong, I understand sometimes you hit a wall (literally). For instance, the common behavior in the demo is the character will not walk to the stairs correctly and get stuck behind them. Is this really a problem with obstacle avoidance?
This is not common behavior. When Intense Pathfinding 1 was released which only allowed 1 Npc to move around, there was only one person that mentioned this out of 100 replies. If you're getting this problem when ordering multiple Npcs, then yes, this is due to obstacle avoidance. I didn't say "nothing" can be done for this problem, I said "nothing" can be done when you're using A*+Points Of Visibility, like I do, and I gave you references and examples as to why this happens. If you don't want to do your own research on this, you'll just have to trust me..
Quote:
Why dont you use a grid anyway? You can can still have mulitiple levels. No single pathfinding system can work for all cases so this seems like a flaw in the design.
How do you suggest that a grid should work for a multistore building then? To save you the hassle, there already is a way to actually map grid squares onto actual 3d geometry and it's called, a NavMesh.. Points of Visibility+A* has been used for any genre successfully. It's all about how the AI handles the information that is given and the specifications of your game. My IP2 Demo is NOT a game, it's just pathfinding.
Quote:
AS far as my complaint about the walking-off-the-ledge issue, how can you not see that this is a weird thing.. unless you are playing a cartoon game, no character is going to want to walk off a high drop-off...Its like you are setting it up only to violate the system.
quake, quake, quake....
Quote:
I do have a very basic question about how to use it in a first person shooter. Obviously, you can't click on the floor and have a NPC move there in that kind of game -- or at least I wouldn't. What is the best way to have the game events function generate a destination point for a NPC?
Hello JimFox. What you're looking for is in the manual:
Code:
SYNTAX:
FoundPath=is_Action_Move_To(PosX,PosY,PosZ,eTarget); //Orders the my agent to go to a certain position.
PARAMETERS:
PosX, PosY, PosZ: Absolute Position for agent to move to. eTarget: Another entity that the Agent should move to
Use either PosX,PosY,PosZ OR eTarget and nullify the other. See Example.
RETURNS:
Is_TRUE or 1 if a path was successfully found. IS_FALSE or 0 otherwise.
MODIFIES:
My.boostVectorX and my.PanForce until the destination is reached.
EXAMPLE:
FoundPath=is_Action_Move_To(200,500,10,null); //Moves my to 200,500,10
FoundPath=is_Action_Move_To(0,0,0,you); //Moves my to you
Quote:
Good stuff Larry. So I take it as opposed to using NavMeshes or a grid-system you'll have AI (via IntenseAI) handle difficult path finding cases.
Correct. Again, a NavMesh would be ideal, but insanely hard. 3 years ago, me, Dr Goodwin and his team from CIDER tried to implement it in Gamestudio and we did diddly squat. But even if we would have managed, now that A7 changed BST with ABT trees, we'd have to start all over again 
Quote:
How do i use the intense pathfinding in a level i have already made? i couldn't find it in the manual.
The easiest way would be to link all scripts from the IP2 demo to your level, then get rid of what u don't really need. IP2 still requires a fairly good level in Programming in order to be used.
Cheers! Aris
|
|
|
|