Opened 13 years ago

Closed 13 years ago

#865 closed enhancement (fixed)

Stances

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

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 (2)

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

Download all attachments as: .zip

Change History (14)

by Badmadblacksad, 13 years ago

comment:1 by Erik Johansson, 13 years ago

Type: defectenhancement

comment:2 by Kieran P, 13 years ago

Milestone: BacklogAlpha 6
Priority: Should HaveMust Have

by Badmadblacksad, 13 years ago

a little more advanced stance implementation

comment:3 by Badmadblacksad, 13 years ago

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 by Kieran P, 13 years ago

Keywords: review patch added
Summary: Stances[PATCH] Stances

comment:5 by Badmadblacksad, 13 years ago

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

comment:6 by Badmadblacksad, 13 years ago

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 by Badmadblacksad, 13 years ago

Keywords: review patch removed
Summary: [PATCH] StancesStances

comment:8 by historic_bruno, 13 years ago

What's left for stances to be finished?

comment:9 by philip, 13 years ago

(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 by Philip Taylor, 13 years ago

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 by Badmadblacksad, 13 years ago

Owner: Badmadblacksad removed

comment:12 by Kieran P, 13 years ago

Resolution: fixed
Status: newclosed

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.