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

Shroud / fog of war #637

Open
tgjones opened this issue Feb 12, 2022 · 0 comments
Open

Shroud / fog of war #637

tgjones opened this issue Feb 12, 2022 · 0 comments

Comments

@tgjones
Copy link
Collaborator

tgjones commented Feb 12, 2022

PartitionCellManager is the thing that stores "partition cell" visibility for each player. It also stores a list of "shroud reveals" which can be generated by scripts. From these partition cells and shroud reveals, it needs to generate a shroud / fog of war texture for the local player.

Here's what I know about partition cell "state" values:

  • 1 means the player has never seen this cell (so it's black in the shroud texture)
  • 0 means the player has previously seen this cell, but now can't see it (so semi-transparent in the shroud texture, and also the objects underneath should be ghost objects, but that's a different topic)
  • Negative numbers - the cell is visible. The higher the negative number, the more visible that cell is, because it has more units, or had more units, in that cell. When units move into a cell, the state value is decremented. When units move out of a cell, then after a timeout, the state value is incremented.
@tgjones tgjones created this issue from a note in Add Gamelogic (To do) Feb 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Add Gamelogic
  
To do
Development

No branches or pull requests

1 participant