Comparision of Pathfinding 1k Units Planetary Annihilation vs Forged Alliance

Discussion in 'Planetary Annihilation General Discussion' started by warrenkc, November 3, 2014.

  1. cola_colin

    cola_colin Moderator Alumni

    Messages:
    12,074
    Likes Received:
    16,221
    Nah, if you want to do micro stuff you simply give move orders that can be followed in a straight line, so you dont get that issue. That issue only happens if you given a unit to move somewhere behind a wall and keep clicking.
    You don't micro units by giving them move orders to far away, you usually click directly in front of them.

    I guess a perfect solution for the multi-clicking issue would be to not throw away the flow field of the old order if the orders are similar. So only fix the part close to the goal, as the part close to the current position of the unit that is given the order won't actually change anyway. Though edge cases probably exist that make that far less trivial than it sounds.
    The question that needs to be answered directly when a new order is given is: Will this change how the unit moves for the next 1 second or so until the full flow field for that order has been created?
    tatsujb likes this.
  2. bgolus

    bgolus Uber Alumni

    Messages:
    1,481
    Likes Received:
    2,299
    We actually don't throw out the old flow field if the new goal is near enough to the previous, but if the field never finished filling out to the unit each click starts with the old incomplete field and the unit never gets an updated movement direction. There's no point finishing the old one since the new real field would have to wait till the old one finishes to start filling out delaying it even longer, not to mention the old one is possibly wrong for the new goal.

    When a unit (or group of units) is given an order there's a high level A* done to figure out the gross path of a unit. This is used to find what parts of the voxel field needs to be filled in rather than doing the entire planet every time. If units stray from the region that's been generated it'll fill in the areas needed. I think there was discussion of making units follow the A* direction instead of the flow field so they at least start moving in roughly the same direction as what the flow field is going to give them.


    Also, our flow fields are actually somewhat dynamic since while units are in motion a building might get created (or destroyed) as well as units might stop moving along the path which will cause the flow field to update in real time.
    cwarner7264, tatsujb, ace63 and 5 others like this.
  3. felipec

    felipec Active Member

    Messages:
    465
    Likes Received:
    190
    PA pathfinding is awesome already. Sometimes few units out of hundreds get stuck, but that doesn't bother me. You guys did an great job! Congratulations
    cdrkf likes this.
  4. cptconundrum

    cptconundrum Post Master General

    Messages:
    4,186
    Likes Received:
    4,900
    Dox stutterstep near a crack only works because the unit moves directly toward the mouse. I don't want to have to make sure my clicks to one side don't end up on the other side of the obstruction. I just want the unit to do what I tell it.
    tatsujb and cdrkf like this.
  5. exterminans

    exterminans Post Master General

    Messages:
    1,881
    Likes Received:
    986
    But it's not what you actually told the units to do, is it? You told them to move towards your cursor - and they did.

    What you are asking for, is "approach target area from a specific direction and continue for a few dozen meters until you clip to terrain". Which also differs from what you have caused by multiple clicking - and which could very well become a regular command.

    At least the second part, that's for sure, so you can chain that intention as a combination of a regular movement command (to get into position) and a new directional "clip to terrain" command which then forces them to march precisely in the specified direction.
    Last edited: November 5, 2014
  6. zgrssd

    zgrssd Active Member

    Messages:
    658
    Likes Received:
    185
    He ran both games on the SAME computer. PA performed much better. So much for "crapy CPU/computer".
    FA is a nice game and all, but it was never designed to handle anything on the scale of 12 players, 1k unit each.
    FA also suffered from the slowest client defining the SimSpeed for everyone. Something that PA avoided entirely with it's client-server architecture (server does all the heavy lifting; client is only a glorified webbrowser with nice 3d graphics - as it should be).

    I think it has been pointed out often enough that the Dox Micro (and Micro in general) is not a relevant part of the game. This game is macro, not micro heavy. Otherwise it would not need such an advanced pathfinding and the extensive multi-threaded design and could just be another Star Craft/C&C clone ;)

    I agree.

    The total war series in particular could learn a thing or 20 for PA's pathfinding. I mean each unit consists of up to 120 single characters. With a 20 unit cap per side (excluding routed units that are still on the field but not controlable).
    warrenkc likes this.

Share This Page