RE: [Algorithms] Formations/flocking
Brought to you by:
vexxed72
|
From: Tom F. <to...@mu...> - 2000-12-08 15:32:34
|
For such short-range paths as this, simply walking in a straight line towards the destination until you hit something. This can fail, obviously, but if a unit does get separated from the group by a significant distance, the distance to travel will get above a certain threshold, and you can start using the full A* again. If the location in the formation is inside an obstacle, nav to the leader's position. When the unit gets close enough, it will again switch to the stupid "walk in straight line", and it'll be fine. There may be problems with units trying to walk through each other of course. The solution may people pick in that case is to not actually care - let them :-) Tom Forsyth - purely hypothetical Muckyfoot bloke. This email is the product of your deranged imagination, and does not in any way imply existence of the author. > -----Original Message----- > From: Sergei Miloikov [mailto:se...@ha...] > Sent: 06 December 2000 12:15 > To: gda...@li... > Subject: [Algorithms] Formations/flocking > > > Hi all! > I am not sure that this maling list is the place for these > topics, but if > things like 'collision' takes place here, why not... > I am wondering is there something about formations and their > behaviour when > they face obstacles... i.e. I have a group of units forming a > 'formation' > i.e. all of them are 'locked' to specific offsets from any other unit > (probably the closest one to the geometric center). And all > that mess must > move through the world avoiding obstacles and trying to keep > its form as > much as possible. > It is obvious that there will be single path finding task - > for the group > leader and then the formation will move with him (althought > the A* may be > used with a proper weight function to cast many path finding calls and > produce good results, but this is slow!). So I find a single > path for the > leader and then this path is partitioned by points located at constant > distance each to other and at each point the formation is > placed - why? > because this way each unit will search for a short-distance path (i.e. > between previous formation copy and the current one) many > times, preventing > a long-distance search done once. This keeps them together > and properly > formed. So, the problem - when some of the units' offsets are > placed inside > obstacles then one must find 'the best' nearest location for > that offset. > How? This is very important when a wide formation is passing a narrow > tunnel. Thanks. > Sergei Miloikov, Haemimont-Smartcom AD > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |