Opened 10 years ago

Last modified 9 years ago

#2913 closed task

Better way to handle visibilities in the simulation — at Initial Version

Reported by: Itms Owned by: Itms
Priority: Should Have Milestone: Alpha 18
Component: Core engine Keywords:
Cc: Patch:

Description

My work on #599 allowed me to work on the visibility systems (fog-of-war, line of sight, etc.), and currently, a large part of the visibility logic is handled by the RangeManager system component, especially in this function.

As a consequence, scripted components can't influence the visibility of an entity. Mods, but also planned features for the main game (like Iberian camouflaged units), would need a way to influence this visibility. Also, the way I plan to tackle #2710 needs it.

I propose to separate this logic into a Visibility component. Several things could benefit from this change.

I think it would be better to do changes in separate patches/commits, to avoid complexity and possible regressions. So I set this ticket as a task, and I will use it to track the changes. Remaining planned changes:

  • Create the Visibility component
  • Find a way to remove the hardcoded and duplicated VIS_FOO in the scripted components Fogging, Mirage and Visibility
  • Move template items GetRetainInFog and AlwaysVisible from Vision to Visibility
  • Fix #2710 with the new system
  • Improve #958 with the new system if possible (see this TODO)
  • For fun, implement camouflaging for some units

Change History (0)

Note: See TracTickets for help on using tickets.