Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
a concrete problem with my pathfinder, this time:
#1
I figured out how to do it, theoretically.

1) First, I get the island borders.
2) Then, I get unique landmasses within the first island border level.
3) Then, I run an algorithm to figure out which landmass is connected to which.
4) Then, I run an algorithm that calculates the paths and distance between adjacent landmasses from each landmass by using even smaller landmasses (circle patches) within the landmass. And I also need to do (3) on this as well.
5) Then I make a search tree for the larger landmasses and find the path from the unit to the target landmass.
6) Then I do the same thing as (4), except I calculate the path from the border of the landmass to the unit or the target.
7) Then I combine those 3 paths to get the big path.

(edit: 1, 2, and 3 done; on to 4)

This is the only workable approach I know, plus there is the added advantage that I can reuse the paths gained in steps 2-6 every time I make a new path!! Thus the path calculation is fast for 10, 100, or 1000 units! :bounce:

http://www.geocities.com/pisforpi/weird3.gif

What do you people think? :|
Peace cannot be obtained without war. Why? If there is already peace, it is unnecessary for war. If there is no peace, there is already war."

Visit www.neobasic.net to see rubbish in all its finest.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)