Pack Behaviour (Dogs\Hounds)
I am struggling to get good behaviour for a pack of dogs. The dogs keep running into each other or they go straight through each other. I think they might need to 'see' the other dogs. They are meant to be chasing a moving object, controlled by arrow keys. When they can't see the object, they slowly head towards a non-moving object and gaurd it. The moving object has to get to the non-moving object without touching the dogs. Any suggestions?
I believe you're looking for 'swarming and flocking behaviour'. There's been lots of research in this area, so Google should provide all you need. Lots of example apps out there to play with, too.
As Morbo says, you could google it or you could just go to the source and read Craig Reynolds paper "Steering Behaviors for Autonomous Characters", which is available online here: http://www.red3d.com/cwr/steer/
Mike
Mike
January 05, 2005 06:59 AM
if they bump into eachother, make sure your collision detection is good. Make them all move towards the same point, and they should come together into a flock. If you want them to stop, move the point they move towards to the average position of each dog. The way to do it varies a lot, if it is tile based a different technique may need to be used.
What you need to do, is give it different forces.
For eg. One force, pushes the dogs onto follow a path
The second force, pulls them apart from objects (including other dogs), which increases exponentially as they get closer to something.
The third force, pushes them together as a pack, it increases exponentially, just less so then the second force.
The forth force, is a random force, which keeps every dog moving in the direction it was.
From,
Nice coder
For eg. One force, pushes the dogs onto follow a path
The second force, pulls them apart from objects (including other dogs), which increases exponentially as they get closer to something.
The third force, pushes them together as a pack, it increases exponentially, just less so then the second force.
The forth force, is a random force, which keeps every dog moving in the direction it was.
From,
Nice coder
Click here to patch the mozilla IDN exploit, or click Here then type in Network.enableidn and set its value to false. Restart the browser for the patches to work.
In my own observation of a pack of mostly wild dogs (15-20) I noticed a few things:
-They all bark a lot at each other, almost as if they are shouting at each other
-There are leaders and followers in the pack. Usually the pack leaders influenced the direction the pack moved.
-There were outliers who were around the edges of the pack
-some dogs chased each other around but maintained the general area of the pack
I guess if you're trying to create a simulation of a pack of dogs, you could have a few different properties for each dog.
Instigators: Cause other dogs to bark at them. If the other dogs get mad enough, they chase the dog instigating them.
Leaders: The average location of the pack is more heavily influenced by the location of leaders
Dogs may get leadership points for instigating a lot?
Just some ideas to throw around
-They all bark a lot at each other, almost as if they are shouting at each other
-There are leaders and followers in the pack. Usually the pack leaders influenced the direction the pack moved.
-There were outliers who were around the edges of the pack
-some dogs chased each other around but maintained the general area of the pack
I guess if you're trying to create a simulation of a pack of dogs, you could have a few different properties for each dog.
Instigators: Cause other dogs to bark at them. If the other dogs get mad enough, they chase the dog instigating them.
Leaders: The average location of the pack is more heavily influenced by the location of leaders
Dogs may get leadership points for instigating a lot?
Just some ideas to throw around
Eric Nevala
Indie Developer | Spellbound | Dev blog | Twitter | Unreal Engine 4
These ideas are rather interesting. By the way, do any of you guys know dark basic?
Here's some research on the subject:
http://www.cs.virginia.edu/~dbrogan/Research/GroupBehaviors/
Try reading the papers, then reading the papers cited in the papers. Get a good feel for the overall research that's been done in the field, then decide what you really need and start implementing.
http://www.cs.virginia.edu/~dbrogan/Research/GroupBehaviors/
Try reading the papers, then reading the papers cited in the papers. Get a good feel for the overall research that's been done in the field, then decide what you really need and start implementing.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement