Jump to content

Zombies using pathfinding


rhonin Nissondorf
 Share

You are about to reply to a thread that has been inactive for 1616 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

i started out with just a prim  using llpursue , with no  PURSUIT_OFFSET or fuzz factor and with , to try and get a prim using pathfinding to collide with my avatar and incur a collision event. i tried using  a  path update event with  pu_goal_reached  but it takes way to long to kick in to make a usefull zombie.  the Prim just keeps acting as if there is a offset constantly. even though i followed the character creation guidlines from the wiki. i dont want to make a zombie with a small timer using navigate to . thats my next step in trying to make this work.

Link to comment
Share on other sites

Both llPursue and llNavigateTo tend to stop short of their goal by 1-2 meters. Pathfinding characters usually will not get close enough to collide with the target. That may be a deliberate feature.

Both calls also just quit fairly often, for no visible reason. Sometimes you get a path_update event, and sometimes you don't. With a few hundred lines of workaround code, you can sort of make this work.  See JIRA.

It's not that hard to get zombie-quality movement out of pathfinding. What's hard is getting human avatar quality movement. I sometimes say that my characters display about n00b user level movement.

  • Like 2
Link to comment
Share on other sites

2 hours ago, rhonin Nissondorf said:

move to target might not work to well with walls.

Right. I have a whole maze solver written in LSL. It's slow, but it works. Maybe I'll cache solutions in notecards to improve performance.

Link to comment
Share on other sites

  • 4 weeks later...
On 7/6/2019 at 6:24 AM, animats said:

It's not that hard to get zombie-quality movement out of pathfinding. What's hard is getting human avatar quality movement. I sometimes say that my characters display about n00b user level movement. 

This is not really the aim of the forum but now you made me curious: Where can I find your sim and/or product? I think it would be cool to experience what is or is not possible when creating games with LSL tools.

Link to comment
Share on other sites

7 hours ago, Estelle Pienaar said:

This is not really the aim of the forum but now you made me curious: Where can I find your sim and/or product? I think it would be cool to experience what is or is not possible when creating games with LSL tools.

I'm not selling NPCs at this time. But I usually have some pathfinding characters running around Animats's Advanced Vehicle Development in Vallone. I also usually leave one running at Animesh 1 on the beta grid. If you go there, they'll find you, approach, say "Hello", wait a bit, and walk off.

Now that overloaded sims are the new normal, it's tough getting pathfinding to work reliably. My characters have extensive recovery code, yet they still get stuck occasionally. Pathfinding sets a heading and speed for each character, and updates that course when it gets around to it. On an overloaded sim, characters continue too far, blind, because the pathfinding system is responding slowly. They get stuck in objects or even go off the parcel.

Link to comment
Share on other sites

  • 1 month later...
On 7/29/2019 at 2:14 PM, animats said:

I'm not selling NPCs at this time. But I usually have some pathfinding characters running around Animats's Advanced Vehicle Development in Vallone. I also usually leave one running at Animesh 1 on the beta grid. If you go there, they'll find you, approach, say "Hello", wait a bit, and walk off.

Now that overloaded sims are the new normal, it's tough getting pathfinding to work reliably. My characters have extensive recovery code, yet they still get stuck occasionally. Pathfinding sets a heading and speed for each character, and updates that course when it gets around to it. On an overloaded sim, characters continue too far, blind, because the pathfinding system is responding slowly. They get stuck in objects or even go off the parcel.

How do you implement the pause in the list of coordinates?

Link to comment
Share on other sites

20 minutes ago, Tech Robonaught said:

How do you implement the pause in the list of coordinates?

Timer events and a state machine.

At the top, there's a "behavior" script, which decides what to do. My current test script checks for new avatars entering the parcel, and goes to greet them. If no one needs to be greeted, it picks a patrol point randomly from a list on a notecard and goes there, then waits for the time listed on the notecard. This keeps my NPCs looking busy.

Movement is set up as a library.The user interface is much like system pathfinding - there's Pursue and NavigateTo. You call one of them, and the character tries to go there.  You get a link message back on completion or failure.

I won't link to it on Github so as not to be accused of advertising. But you can IM me. It's not a product yet, anyway, or ready for use by others; R&D and demos for now.

I usually leave some NPCs running around my place in Vallone. Having busy NPCs around makes me work on their social skills. At normal walking speed and faster, this becomes important. At creeping zombie speed, people will tolerate worse behavior, because you have plenty of time to get out of their way, even if they're too stupid to get our of your way.  We need to give NPCs behaviors people can live with. Otherwise, users will hate the things. Come over, check them out, and comment, please.

  • Like 1
Link to comment
Share on other sites

  • 2 months later...
On 9/2/2019 at 3:15 PM, animats said:

Timer events and a state machine.

At the top, there's a "behavior" script, which decides what to do. My current test script checks for new avatars entering the parcel, and goes to greet them. If no one needs to be greeted, it picks a patrol point randomly from a list on a notecard and goes there, then waits for the time listed on the notecard. This keeps my NPCs looking busy.

Movement is set up as a library.The user interface is much like system pathfinding - there's Pursue and NavigateTo. You call one of them, and the character tries to go there.  You get a link message back on completion or failure.

I won't link to it on Github so as not to be accused of advertising. But you can IM me. It's not a product yet, anyway, or ready for use by others; R&D and demos for now.

I usually leave some NPCs running around my place in Vallone. Having busy NPCs around makes me work on their social skills. At normal walking speed and faster, this becomes important. At creeping zombie speed, people will tolerate worse behavior, because you have plenty of time to get out of their way, even if they're too stupid to get our of your way.  We need to give NPCs behaviors people can live with. Otherwise, users will hate the things. Come over, check them out, and comment, please.

Any hard and fast way to eliminate the pause I have noticed when a Character moves between co-ordinates?

Link to comment
Share on other sites

2 hours ago, Tech Robonaught said:

Any hard and fast way to eliminate the pause I have noticed when a Character moves between co-ordinates?

How are you moving them? KFM is smooth and pause-free for the chain of moves in one call to llSetKeyframedMotion. SL pathfinding is smooth in open space, but gets weird in tight spots. Making repeated calls to llSetPos tends to be jerky.

Link to comment
Share on other sites

9 hours ago, animats said:

How are you moving them? KFM is smooth and pause-free for the chain of moves in one call to llSetKeyframedMotion. SL pathfinding is smooth in open space, but gets weird in tight spots. Making repeated calls to llSetPos tends to be jerky.

pathfinding  - list of coordinates in globals - simple character stuff, just seems to be a 1 second pause between 1 coord to the next coord cant seem to get rid of it.

Link to comment
Share on other sites

3 hours ago, Tech Robonaught said:

pathfinding  - list of coordinates in globals - simple character stuff, just seems to be a 1 second pause between 1 coord to the next coord cant seem to get rid of it.

Using llPatrolPoints? I've never tried that, but it has a "pause at each point" option, which might be on.

If you're in a sim with no idle time, pathfinding will be jerky. Pathfinding seems to have lower priority than almost everything else that uses server CPU time. At each patrol point, it has to plan the next move, which takes some resources.

SL pathfinding just doesn't work very well if you have specific destinations. "Wander" works OK, because if it's doing the the wrong thing, you can't tell. Motion to a goal, not so much. That's why I had to write my own system.

Link to comment
Share on other sites

On 11/20/2019 at 1:36 PM, animats said:

Using llPatrolPoints? I've never tried that, but it has a "pause at each point" option, which might be on.

If you're in a sim with no idle time, pathfinding will be jerky. Pathfinding seems to have lower priority than almost everything else that uses server CPU time. At each patrol point, it has to plan the next move, which takes some resources.

SL pathfinding just doesn't work very well if you have specific destinations. "Wander" works OK, because if it's doing the the wrong thing, you can't tell. Motion to a goal, not so much. That's why I had to write my own system.

 llNavigateTo(llList2Vector(points, i),[FORCE_DIRECT_PATH, TRUE]);
            moving = TRUE;

It works pretty flawlessly on the sim, my only complaint with it is the pauses ...

Link to comment
Share on other sites

6 hours ago, Tech Robonaught said:

 llNavigateTo(llList2Vector(points, i),[FORCE_DIRECT_PATH, TRUE]);

Oh, you're running the pathfinding system with pathfinding turned off, with FORCE_DIRECT_PATH. I guess it can't screw up in that mode.

There's a pause because pathfinding tries to slow to a stop before reaching the destination. You can try llPatrolPoints. In open space at slow speed, pathfinding can be useful. Tight spaces or high speed, it gets confused.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 1616 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...