Opened 4 years ago

Closed 2 years ago

Last modified 2 years ago

#3915 closed enhancement (fixed)

[PATCH] Visual Attack Range

Reported by: scythetwirler Owned by: elexis
Priority: Should Have Milestone: Alpha 23
Component: UI & Simulation Keywords: patch beta
Cc: Patch: Phab:D568

Description (last modified by elexis)

We need to have a visual idea of how much attack range is (including techs);

e.g. when you hover or click on a tower, it will draw a circle (or a deformed circle, depending on elevations). Similarly for building previews (taking techs into account)

When attempting to place a foundation of a building with attack range, this circle should be displayed

Circle can be black in color to differentiate from aura effects.

See #4349 for aura range.

Attachments (2)

visualrange_v0.1.patch (4.5 KB) - added by Sandarac 4 years ago.
WIP patch that shows the maximum range of defensive structures when hovered or selected. Based on the code used to display the debug range overlay.
visualrange_v0.2.patch (7.2 KB) - added by Sandarac 4 years ago.
Properly handles multiple selected buildings.

Download all attachments as: .zip

Change History (27)

comment:1 Changed 4 years ago by Lionkanzen

This good example in AOE castle under siege: http://i.imgur.com/U31sHsi.jpg

Last edited 4 years ago by sanderd17 (previous) (diff)

comment:2 Changed 4 years ago by elexis

Backlogging due to lack of progress.

comment:3 Changed 4 years ago by elexis

Milestone: Alpha 21Backlog

Changed 4 years ago by Sandarac

Attachment: visualrange_v0.1.patch added

WIP patch that shows the maximum range of defensive structures when hovered or selected. Based on the code used to display the debug range overlay.

comment:4 Changed 4 years ago by Sandarac

Keywords: rfc patch added
Milestone: BacklogAlpha 21
Summary: Visual Range[PATCH] Visual Range

comment:5 Changed 4 years ago by elexis

Don't forget to bump the year in the comments.

Version 0, edited 4 years ago by elexis (next)

comment:6 Changed 4 years ago by Imarok

It would be nice to show this range circle in the building preview too. Bugs(/Features?):

  • Select a tower, hover another one => no range indicator at all
  • Should it show only one range circle when selecting multiple towers?
Last edited 4 years ago by Imarok (previous) (diff)

Changed 4 years ago by Sandarac

Attachment: visualrange_v0.2.patch added

Properly handles multiple selected buildings.

comment:7 Changed 4 years ago by bb

This patch doesn't seem to take the range upgrade for the defence tower into account (at least the visual range does not change when researched) It would be nice if the was a visual range when constructing a building: to know the limits of the range before building.

comment:8 Changed 4 years ago by Sandarac

Keywords: rfc removed
Milestone: Alpha 21Backlog

comment:9 Changed 4 years ago by scythetwirler

Keywords: beta added

comment:10 Changed 4 years ago by scythetwirler

Summary: [PATCH] Visual Range[PATCH] Visual Attack Range

comment:11 Changed 4 years ago by scythetwirler

Description: modified (diff)

comment:12 Changed 4 years ago by scythetwirler

Description: modified (diff)
Keywords: wip added

comment:13 Changed 4 years ago by scythetwirler

Keywords: wip removed
Milestone: BacklogAlpha 22

comment:14 Changed 3 years ago by elexis

Delenda Est has a visually appealing aura range:

http://media.moddb.com/images/members/4/3718/3717519/profile/screenshot0714_small.jpg

However the implementation is inacceptable, as it replaces the selection ring texture with that texture and scales it to the aura size manually (so every balancing change needs to change some graphical setting by hand): https://github.com/JustusAvramenko/delenda_est/commit/0019f858b8854baac28c042859400ff6e2a3f300#diff-a6bb63d568e94dbf00b07cdc5199a70c

comment:15 Changed 3 years ago by fatherbushido

(and it throws unit far away when ungarisoning iirc :))

comment:16 Changed 3 years ago by elexis

Description: modified (diff)
Milestone: Alpha 22Backlog

comment:17 Changed 3 years ago by elexis

Milestone: BacklogAlpha 23
Patch: Phab:D568

comment:18 Changed 2 years ago by elexis

Owner: set to elexis
Resolution: fixed
Status: newclosed

In 20608:

Attack Range Visualization.

Fixes #3915
Differential Revision: https://code.wildfiregames.com/D568
Based on patch by: Sandarac

comment:19 Changed 2 years ago by elexis

In 20618:

Move EOverlayType and SOverlayDescriptor from the Selectable component to Overlay.h.

Refs #3915, D568
Patch By: Sandarac
Taken from D555
Reviewed By: Vladislav

comment:20 Changed 2 years ago by elexis

In 20621:

Move selection ring OverlayTexture? code from CCmpSelectable::UpdateTexturedLineOverlay? to the SOverlayTexturedLine struct in graphics/Overlay.cpp and SimRender? in simulation2/helpers/Render.cpp.
This abstraction allows calling that code again from other simulation components, like the RangeOverlayRenderer? in D555.

Differential Revision: https://code.wildfiregames.com/D1139
Refs #3915, D555
Comments By: Vladislav, echotangoecho

comment:21 Changed 2 years ago by elexis

In 20622:

Render the range visualization of auras, heal and attack component in a separate RangeOverlayRenderer? component instead of abusing Selectable for that.
This also allows non-selectable entities like building previews to cast range visualizations.

Patch By: Sandarac
Differential Revision: https://code.wildfiregames.com/D555
Refs #3915, #4349, rP19519 / D238.
Comments By: Vladislav

comment:22 Changed 2 years ago by elexis

In 20624:

Use only one getter for range overlays instead of three to four in the Heal and Auras component.
Move default Heal range visualization texture properties to the template and only display Heal ranges if the template was given.

Differential Revision: https://code.wildfiregames.com/D1128
Refs #3915, #4349, D238, D432, D568

comment:23 Changed 2 years ago by elexis

In 20627:

Rename RangeVisualization? component from rP19519 / D238 to RangeOverlayManager? for consistency with the RangeOverlayRenderer? from rP20622 / D555.
Refs #4899, #3915

comment:24 Changed 2 years ago by elexis

In 20963:

Fix range overlay color after deserialization following rP20622 / D555, refs #3915.

Since the component initialization order is the alphabetic filename order and
since the RangeOverlayRenderer? < Player < Selectable, the new file in that commit introduced the issue.
Similar to rP19861, refs #4632.

UpdateColor? function taken from temple's D754

comment:25 Changed 2 years ago by elexis

Refs #5207 for elevation adapted attack range.

Note: See TracTickets for help on using tickets.