Ticket #865 (closed enhancement: fixed)

Opened 2 years ago

Last modified 23 months ago

Stances

Reported by: Badmadblacksad Owned by:
Priority: Must Have Milestone: Alpha 6
Component: UI & Simulation Keywords:
Cc:

Description

I tried to implement stances recently. I give up for a few days as I've got boring school work to do..

I tried to match those requirements : http://www.wildfiregames.com/forum/index.php?showtopic=13725

so, I just attach a patch. If you have time, and a better way to do theses things, please comment.

Attachments

diffStances-29-05-2011.patch (26.8 KB) - added by Badmadblacksad 2 years ago.
diffStances-05-06-2011.patch (26.0 KB) - added by Badmadblacksad 2 years ago.
a little more advanced stance implementation

Change History

Changed 2 years ago by Badmadblacksad

comment:1 Changed 2 years ago by feneur

  • Type changed from defect to enhancement

comment:2 Changed 2 years ago by k776

  • Priority changed from Should Have to Must Have
  • Milestone changed from Backlog to Alpha 6

Changed 2 years ago by Badmadblacksad

a little more advanced stance implementation

comment:3 Changed 2 years ago by Badmadblacksad

I think I will stick to the current design, i.e. having only one rangeQuery per unit. We can still change that later if we need.

comment:4 Changed 2 years ago by k776

  • Keywords review, patch added
  • Summary changed from Stances to [PATCH] Stances

comment:5 Changed 2 years ago by Badmadblacksad

(In [9631]) Stances draft, refs #865

comment:6 Changed 2 years ago by Badmadblacksad

I discovered an issue in UnitAI: sometimes units don't detect any enemy in their LOS. Don't know why now. That's was just to tell this is not a feature..

comment:7 Changed 2 years ago by Badmadblacksad

  • Keywords review, patch removed
  • Summary changed from [PATCH] Stances to Stances

comment:8 Changed 2 years ago by historic_bruno

What's left for stances to be finished?

comment:9 Changed 2 years ago by philip

(In [9657]) Attempt minor improvements to stances code (see #865). Don't chase units that are no longer visible, beyond where they were last seen (fixes #595).

comment:10 Changed 2 years ago by Philip

Made some minor changes like:

  • Instead of ModifyRangeActiveQuery, it just calls SetupRangeQuery to reset the query when the range changes - I think it's less confusing to keep range queries immutable, and to stick with a single function that updates the query.
  • Instead of StanceSpecificQuery explicitly checking for targets after stance changes, it relies on the LosRangeUpdate in IDLE to trigger target-detection, to hopefully simplify the logic a bit.
  • UnitMotion now follows units only while they're visible; if they disappear in FoW then it stops updating the target, and just continues on to the last known location, so scripts don't need to check the FoW visibility themselves (except when first issuing move commands - it's the caller's responsibility in that case).
  • Changed some names (I prefer it when function names start with verbs, e.g. IsStanceSelected not StanceSelected), and rearranged some logic and updated comments etc a bit.

(I've tried to test this and it seems to still work, but I haven't tested it entirely thoroughly so I'm not entirely confident in that.)

I'm not sure what exactly is left to be done, though the GUI buttons definitely need moving into the right place (wherever that is).

comment:11 Changed 23 months ago by Badmadblacksad

  • Owner Badmadblacksad deleted

comment:12 Changed 23 months ago by k776

  • Status changed from new to closed
  • Resolution set to fixed

Done for the most part. There are some reported issues/weirdness with stances, but new tickets should be made for them.

Note: See TracTickets for help on using tickets.