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

Spectator overhaul #5171

Merged
merged 205 commits into from
Aug 12, 2017
Merged

Spectator overhaul #5171

merged 205 commits into from
Aug 12, 2017

Conversation

kymckay
Copy link
Member

@kymckay kymckay commented May 17, 2017

Objective:
Overhaul the spectator component to match the UX of BI's End Game Spectator, while retaining any additional functionality of the current implementation of ace spectator.

Todo:

  • New UI
  • Free camera
  • Follow camera
  • First person camera
  • Unit focus system:
    • Can focus on units in free camera
    • Can click on units in 3D world
    • Can click on units in 2D map
    • Can click on units in UI list
    • Focused unit information widget
      • Toggle
      • Add support for ACEX kill tracker feed (Scrapped for now)
  • UI toggle
  • Camera mode buttons
    • Update the buttons properly when camera mode switches
    • Replace with more generalised button dock for potential future camera modes?
  • Map functionality
    • Unit drawing and highlighting
    • Camera icon
    • Camera teleport on click
  • Help UI element
    • Toggle
    • Update entries dynamically
  • Locations functionality
    • List tab switching
    • Populate list with locations
    • Functions to add/remove locations
    • Location drawing
  • Camera light toggle
  • Adjustable view distance
  • Unit/Group visualisation
    • Toggle
    • Draw loop
    • Support for revive icons (BIS and ACE)
  • Projectile visualisation
    • Toggle
    • Draw loop
    • Add fired EHs
  • Usable virtual spectator unit
  • Setting to optionally replace BI's spectator with ACE spectator
    • Not feasible. Just look into respawn 1,4 & 5 compatibility.
  • Everything marked with TODO in the code
  • Probably a bunch more stuff

Retained:

  • Vision mode system
    • Fine control over available vision modes
    • Can add extra vision modes
  • Camera mode system
    • Fine control over available camera modes
    • Possibility to add extra camera modes in future
  • Non-forced UI capability
  • Unit whitelisting/blacklisting
  • Control over spectatable sides
  • Compatibility with BI counter respawn template (use UI event)
  • Free camera heading publicly adjustable
  • Free camera position publicly adjustable

Removed:

  • Compass UI element
  • Some camera attributes
    • Free camera zoom functionality
      • Replace with +/- incremental zoom keys
      • Engine limitation prevents this. Need to use camcurator for engine driven controls, which doesn't support camSetFOV.
    • Camera speed functionality
      • Replace with 2x, 4x & 8x speed hotkeys
    • Free camera tilt publicly adjustable
    • Add obsolete warnings to public function
  • Interrupt system?
  • "Side filter" setting (same results can be achieved by manipulation of spectatable sides)
  • "Unit filter" setting (replace with "spectate AI" setting, aim is to simplify setup process)
  • Obsolete stringtable entries

Add:

  • Extra optional camera modes?
    • Bullet cam
    • Top down
  • Extra respawn templates?
    • Number of lives then permadeath?
  • Compatibility with other respawn templates?

Things to Test:

  • JIP into a virtual spectator unit initialises correctly
  • Location removal updates the list correctly
  • Unit whitelisting/blacklisting works correctly
  • Addition/removal of vision modes still works as expected
  • Addition/removal of camera modes still works as expected
  • Adjusting camera attributes all work as expected

Special thanks:
Significant amount of code contributed by @AACO who had already performed a lot of optimisation and conversion work for https://github.com/BourbonWarfare/POTATO. Added to function headers where appropriate and will be added to authors too.

kymckay added 17 commits May 15, 2017 14:09
Public function which should wait for player unit to exist before running.
With this change an additional variable is now set on the player unit which
can be used to check whether players are spectators or not (part of
grander plans).
Should make it so that calling the public function before the main display
has initalized will correctly wait until it has before starting spectator
Initial WIP overhaul of spectator component. Based on BI's End Game
Spectator and AACO's work on POTATO spectate. The essential functionality
is in place, but some things are broken and some are still to be
transferred.
Spectator UI will be open anyway so this is pointless.
Also ensure unit camera modes have a target more consistently
@kymckay kymckay added exp/intermediate impact/large kind/bug-fix Release Notes: **FIXED:** kind/enhancement Release Notes: **IMPROVED:** status/WIP labels May 17, 2017
@kymckay kymckay self-assigned this May 17, 2017
@kymckay
Copy link
Member Author

kymckay commented May 17, 2017

So thankfully the hard part of this where I had to mash two code bases together and break arma a bunch of times is over (which is why a load of stuff is done in that one "overhaul spectator" commit).

Progress from here on should be relatively smooth (though 1.7 arma has started to semi-regularly crash my display driver) as I can actually test changes as I make them, but everything's looking good so far 👍

};

// Draw projectiles and grenades paths
if (GVAR(drawProjectiles)) then {
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

Problem with this is that it's generalised and doesn't meet the needs of this specific use case (optimised for mass application, drawing when near camera only, easily toggled, etc.). However, I might be able to borrow some of the drawing code if applicable. 👍

Copy link
Member

Choose a reason for hiding this comment

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

Makes sense to me.

Though, you might still add the unit when in proximity and remove it when too far from it.
And for performance you could reduce the amount of lines that are drawn at the same time

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, I'll try and experiment with this when I'm working on the projectile drawing

kymckay added 4 commits May 18, 2017 09:17
Use of `inputAction` could result in weirdness when multiple keys pressed
at the same time. Hardcoded for now.
jonpas and others added 17 commits July 10, 2017 21:42
…Canister (#5353)

* Add support for Tanoan fuel pumps, Flexible Tanks and Fuel Canister (as jerry can)

* Add to Land_FuelStation_01_pump_malevil_F

* Add Malden/Jets to required addons

* REQUIRED_VERSION 1.72
* Fix throw key handling when reloading

* Consider UGL reload to ace_common_isReloading var

* Fix if space, change private var assign

* Shorten UGL check
* Fix throw key handling when reloading

* Consider UGL reload to ace_common_isReloading var

* Fix if space, change private var assign

* Shorten UGL check
* Update ACE_Settings.hpp

Correction of typos.

* Update CfgVehicles.hpp

Correction of typos.

* Update stringtable.xml

Correction of typos.

* Update AUTHORS.txt

In accordance with your process of merging pull requests.
* add new acerep

* fix typos

* change date
Change have have to have
* Fix missing string with stringtable

Fix Advanced Fatigue & QuickMount

* Fix Chinese content & missing string

* Fix Gestures & DAGR missing string

* Fix quickmount string with vanilla string

* Remove adr97 unnecessary string
* Update settings-framework.md

Modifications and extensions.

* Update settings-framework.md

Replacement of the bulleted list with a numbered list, as the steps are in chronological order. Removal of superfluous text.
* Update the Jpn translation

Support to new entry

* Update the Jpn translation

for more Natural words.

* Update the Jpn translation

Unification of words.

* Update the Jpn translation

tweaks to words.

* Update the Jpn translation

Fix to wrong translation.

* Update the Jpn translation

added translation to Proper noun

* Update to Jpn translation

Fix to wrong translation.
Dystopian and others added 6 commits July 27, 2017 08:26
* Add addon template mention

* Add fast function recompiling mention

* Add LINKFUNC macro description

* Update coding-guidelines.md
* Workaround for laser max range. Made laser hud seeker use ammo values.

* Nested ifs for optimization of check
Hard to find a reference for this, but figure it is useful to others as it's fairly common in older HEAT shells (WW2 stuff is why this even came to my attention) and modern fast-acting explosives.

It's a bit of an approximation as I had to interpolate the value of the first reference so that it was correct relative to the other values on our wiki (by using two other explosives common to both tables). The second reference in fps converts to roughly the same value in m/s so I'm content to call it good.

References:
http://axpro.mines.edu/documents/MNGN%20444_Fragmentation%20and%20Safety%20Distances%20_Examples.pdf, p.3
http://dtic.mil/dtic/tr/fulltext/u2/783941.pdf, p.25
* Change repair action's colors on wheels

* Add dots.
it can be used for MACRO way only
@kymckay kymckay merged commit d3ce75d into master Aug 12, 2017
@kymckay kymckay deleted the SpectatorOverhaul branch August 12, 2017 13:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
impact/large kind/bug-fix Release Notes: **FIXED:** kind/enhancement Release Notes: **IMPROVED:**
Projects
None yet
Development

Successfully merging this pull request may close these issues.