Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

fonix

Question about array path-finding

This topic is 6188 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am working on a RTS project. In this game,what you can control is array, not a single unit like other RTS. Each array have a leader(general) and some members. First, I use the leader to find a probable path. But because array's size is larger than leader, if the array barely walk along this path, some members may collide the obstacle£¬and the array's formation will be corrupt. So the path should be adjusted to avoid the obstacle. Who can give me some suggestion about it? Thanks! Edited by - fonix on December 29, 2001 6:58:50 AM

Share this post


Link to post
Share on other sites
Advertisement
yah, he wants to have groups of units in formation...
you might be able to allow the formation to "smoosh" (for lack of a better word) together to fit through tight spots, then regroup afterwards.
if this is unacceptable, you''ll just have to take the size of the group into account when pathfinding.

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
Main Entry: array (noun)
1 a : a regular and imposing grouping or arrangement : ORDER (lined up ... in soldierly array -- Donald Barthelme)
2 a : CLOTHING, ATTIRE b : rich or beautiful apparel : FINERY
3 : a body of soldiers : MILITIA (the baron and his feudal array)
4 : an imposing group : large number (faced a whole array of problems)
5 a (1) : a number of mathematical elements arranged in rows and columns (2) : a data structure in which similar elements of data are arranged in a table b : a series of statistical data arranged in classes in order of magnitude
6 : a group of elements forming a complete unit (an antenna array)

--- krez (krezisback@aol.com)

Share this post


Link to post
Share on other sites
i wonder if array formation is cheating or non-cheating ai, i wonder what the academics would have to say about this..

Share this post


Link to post
Share on other sites
Cheating off course. It looks ahead

-Maarten Leeuwrik
"Some people when faced with the end of a journey simply decide to begin anew I guess."

Share this post


Link to post
Share on other sites
There are 2 articles at Gamasutra, and they are very good (the second one is the sequel to the first).

For my RTS, I don''t actually need formations, and I don''t have huge maps either. So when doing group movement, after doing a few experiments with A*, I realised that it was a simpler method which could give the best results. I wrote a function which would make an influence map, which just told me the true distance from each tile on the map to a fixed point. This meant, that if I just continued to move to a square which was closer, I would get to the destination. All of this takes very little processing time once the influence map is formed, and surprisingly, the map only takes about 2 frames to produce (running at 60hz).

For areas where holding formation will not be possible, you might consider using this approach - the advantage is that all the units can use the same influence map since they are all going to the same point.

Trying is the first step towards failure.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!