Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks and improvement to declutter defense-ranges (2nd attempt) #4050

Open
wants to merge 29 commits into
base: master
Choose a base branch
from

Conversation

WatchTheFort
Copy link
Member

From @icexuick in the original PR #3732:

And removal/integration of old defense-ranges + anti-ranges into new gl4 defense-ranges.

This is a new and tweaked version of the Defense-Ranges Widget.
It is meant to replace the old Defense Ranges.

What needs to be checked but also fixed/added is this:

gui_defenserange_gl4

  1. Show the range rings on mouse-hover on the minimap.
  2. Add underwater weapons (torpedoes) as blue rings
  3. Make cannon (LRPC) range rings disappear on distance (anti-nukes works correct, cannon does not - it remains visible)
  4. Add different pulsating color/fade to anti-nukes (allied) that have 0 stockpile - code of gui_anti_ranges.lua should probably be merged into gui_defenseranges_gl4.lua

gui_attackrange_gl4

  1. Separate "cannon" to only LRPC - (only for cannons that shoot over f.e. 2000 range - now it's gets assigned to practically all plasma cannons)
  2. Consider adding blue underwater weapons here as well
  3. Be able to manually choose which units show firing arcs, and which don't - some have quite some overlapping/confusing arcs which should be removed - while others (like armmanni or cormart) visually explain their firing-arc very well, and not too cluttering)
  4. LRPC now actually show their range on hover because of separate "cannon" settings (only needs to be added to minimap for ideal solution)

New zoomed out view with added LRPC cannons (yellow/orange) and anti-nukes (light-blue)
image

New zoomed in view on defense ranges with much less clutter:
image

PS. Also added as much Legion defenses as possible - but needs checking.

icexuick and others added 26 commits September 16, 2024 10:37
And removal/integration of old defense-ranges + anti-ranges into new gl4 defense-ranges
back to red for cannons + yellow for antinuke
…ce rendering a circle on attack range isntead of the limited fire arc cone.
…amera, but the distance from the circle to the camera float distToCam = length(circleWorldPos.xyz - camPos.xyz); //dist from cam
And additionally removed engine attack-ranges, which showed up on hover-attack. These practically are not needed anymore as attack-ranges should show/take care of all attack ranges now.
Including some fade/distance and try-out to get melee weapons shown up.
AA weapons on coraak / armaak with bogus seem to be ignored and all weapons show up.
Reset of cmdcolor rangeAttack back to red - unfortunately - this is/should be removed as it clutters a lot. But placement of defenses still uses this engine ring, and also when using the "Attack" command - which still is useful.
Known issues:
- GetUnitWeaponVectors(unitID, weaponID).y must be passed in for both!
- Which can unfortunately change for popups

But we are much closer to ground truth now
… also implement hacky way of identifying a units true turret Y position, greatly increasing accuracy.
…in the clipspace depth for nicer occlusion calcs
@WatchTheFort WatchTheFort marked this pull request as draft December 20, 2024 16:18
@WatchTheFort
Copy link
Member Author

#3732 had to be reverted because it broke range circles. This PR replaces it, as in Github merged PRs cannot be reopened.

@@ -254,7 +254,20 @@ local function initUnitList()

-- LEGION
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

T1 LLT (leglht) and T1 arty (legcluster) are missing from this list.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what weapon types do leglht and legcluster have?
0 = default / land/ground based weapon
1 = AA
2 = anti-nuke
3 = long-range artillery

Copy link
Contributor

@ZephyrSkies7 ZephyrSkies7 Dec 30, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leglht should be 0, it's just the LLT equivalent. Pretty sure legcluster is also 0 since it's a short range arty as an equivalent to the Agitator and Gauntlet.

EDIT: Apologies if this comment in particular is preventing a merge, please mark as resolved at your discretion

@ZephyrSkies7
Copy link
Contributor

With the thicker range lines across the board, increasing the visibility and prevalence of radar rings might be worth consideration. Could look considerably more camouflaged on predominantly grassy maps.

@icexuick
Copy link
Collaborator

Grass + radar
Attack + red rock
Sonar + water
They remain tricky.

There are solutions like saturation or increased thickness, though they are hard to balance well and to still not clutter.
I would love some configuration for this before merging, meaning some extra settings for these.
Iirc these are not in the settings menu in this PR.

@icexuick
Copy link
Collaborator

icexuick commented Dec 21, 2024

These were some errors posted by CMDR*Zod

[t=01:30:48.582621][f=0001781] LuaShader: [Attack Range GL4] shader error(s):
0:11011(9): error: no matching function for call to `texture(sampler2D, vec2, float)'; candidates are:

[t=01:30:48.584726][f=0001781] Attack Range GL4,  recompiled in , 6, ms at, 1781, success, false
[t=01:30:48.584738][f=0001781] AttackRange GL4 widget exiting with reason: Failed to compile attackRangeShader GL4 ```

@Beherith
Copy link
Collaborator

Grass + radar Attack + red rock Sonar + water They remain tricky.

There are solutions like saturation or increased thickness, though they are hard to balance well and to still not clutter. I would love some configuration for this before merging, meaning some extra settings for these. Iirc these are not in the settings menu in this PR.

  1. I do not understand the list above
  2. These should not be user configurable, keep user config to an absolute minimum. Configure them in the widget.
  3. I fixed the shader errors

@Beherith
Copy link
Collaborator

#3732 had to be reverted because it broke range circles. This PR replaces it, as in Github merged PRs cannot be reopened.

Broke, how so? Got links?

@WatchTheFort
Copy link
Member Author

@sprunk
Copy link
Collaborator

sprunk commented Dec 23, 2024

I do not understand the list above

Since radar circle is green, the circle is hard to see on grass which is also green - it blends into the terrain.
Ditto for attack range, whose red circle is hard to see on "Mars" style red terrain.

@Beherith Beherith marked this pull request as ready for review December 28, 2024 22:40
@icexuick
Copy link
Collaborator

@ZephyrSkies7 could you provide the weapontypes for the 2 missing Legion defenses?

@keelefi
Copy link
Contributor

keelefi commented Dec 29, 2024

I started testing this and the widget "Attack Range GL4" no longer crashes.

However, I found a bug: Build an Armada bot lab. Start building a constructor bot and select the constructor while it's building. The build range of the constructor should show. Wait for the constructor to finish building. The build range of the constructor disappears. (You can get the build range of the constructor back by deselecting and reselecting the finished constructor)

I'm also not a fan of the LLT ranges not being shown when not selected, but that's a game design decision and I'm not part of the game design team.

P.S. please give your git branches sensible names and don't use & as part of the name:

$ git fetch beyond-all-reason New-Defense-Ranges-GL4-/-Removal-of-old-&-anti-ranges
[1] 13765
-anti-ranges: command not found

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants