Pathfinding control development considerations

Yes, the fact is i am a little bit lazy and i keep using a big model so it overlaps with everything eheheh,

take a look at this article , it proposes interesting smoothing tecniques to apply to create a more

realistic walking : http://www.gamasutra.com/view/feature/3096/toward_more_realistic_pathfinding.php?print=1



Unfortunately i have to wait a little bit to apply steering because i don’t have a lot of experience with

animations and i want to make some tries to become acquainted.

Just to let you guys know, this is the progress I’ve made: http://dl.dropbox.com/u/3279456/dist.7z



I’m improving the library that existed. I’ll improve even more, as it isn’t ready yet. But I think I’ve made some real progress, in comparisson of it was before. It remembers now the http://cs.gmu.edu/~eclab/projects/mason/ , where you can tweak some constants to adjust to your situation.

1 Like

Missing grass texture.

com.jme3.asset.AssetNotFoundException: Textures/Terrain/splat/grass.jpg (Flipped) (Mipmaped)

Sorry, fixed: http://dl.dropbox.com/u/3279456/dist.7z I’m not even using it =anymore P

Now, with this ready, I’ll try to merge this with a A* to find the shortest path, while being able to avoid obstacles in the way, and, of course, following the planned path. I’ll post back the results when they are ready.

Hm, I am intrested in pathfinding and steering behaviors. Do you use a grid for your A* algorithm?

I am working at a realtime strategy game and therefore I thought a grid would be useful because you can construct and destroy buildings.

Besides you can check easily if a fat unit has enaugh space to walk through a small path.

But then I would need a Square as an Obstacle for the jmonkey steering behavior and atm the whole code is only for circles.

Hey,



Grids, NavMeshes, Poly Maps, Waypoints, they are just ways to do find out the possible walking area.



That check is easy and it’s a direct check for circles while trying to steer, but for squares, things get’s a bit more complicated. For the pathfinding algorithm, the A*, it’s easy in either way. But to avoid squares and other polygons, I’ll need to work on that a bit, and I won’t be doing that for now.



Besides that, you could say to your steering algorithm to try to avoid a circle, but the physics object he is trying to avoid is a square, so, in the end, you have the most simple solution of all (in my head at least that worked out).

Okay, i have another question about the updateVelocity method.

With

[java]Vector3f steeringForce = truncate(steeringInfluence, this.maxTurnForce * scale);[/java]

the steeringInfluence is limited with the maxTurnForce. I dont think that this make sense because this also limit the speed of the vehicle on a straight line. Because of this I would only limit the speed with the maxSpeed of the vehicle and than later check that the diference of the old and the new velocity is curtaild.

Use the MotionPath and MotionTrack to smoothly follow the path generated by your A*path algorithm, and add a listener to them onWayPointVisit or w/e its name was :).

@ogerlord said:
Okay, i have another question about the updateVelocity method.
With
[java]Vector3f steeringForce = truncate(steeringInfluence, this.maxTurnForce * scale);[/java]
the steeringInfluence is limited with the maxTurnForce. I dont think that this make sense because this also limit the speed of the vehicle on a straight line. Because of this I would only limit the speed with the maxSpeed of the vehicle and than later check that the diference of the old and the new velocity is curtaild.


Well, feel free to disagree with the author: http://www.red3d.com/cwr/steer/gdc99/

This is the implementation of the steering behaviors by Reynolds definition. The implementation I'm developing is still that implementation, but will be fully working, what takes some time.

@nadersleiman said:
Use the MotionPath and MotionTrack to smoothly follow the path generated by your A*path algorithm, and add a listener to them onWayPointVisit or w/e its name was :).


That works for most ocassions, but not for me. I need to make a formation that never breaks.
Well, feel free to disagree with the author

I resettet a vector and therefore I had some problems with wrong values ;)

In the tests the vehicles sometimes overlap, is this the result of some small optimisation problems or do I need to wait for your new version of the steering behavior classes?

Edit:
Or do I need to add a collision detecion when I move a vehicle?