Ok. Done implementing fog/tall grass blocking vision. Also fixed a ton of bugs. As always, comments and suggestions are welcome.
The Fog of War regeneration mechanics is actually allows some choices with various drawbacks. For example, FOW can be regenerated at the end of players turn, at start of player's turn, both at the start and at the end, or when any unit finishes movement. Deciding how to implement FOG of war, I made a pros/cons table (such tables appear to be a common game design instrument).
End of Turn:
- Pros:
- Player doesn't see enemy movement in territories he left.
- Player can still see enemies which killed his units or casted Mist.
- Player can see all terrain he uncovered during this turn. Makes it easier for player to remember stuff. Especially if player loads the game after few days.
- AI handles it easily, noticing positions of your units.
- Intuitive.
- Cons:
- Effects like Mist wont blocking vision won't be immediately noticeable.
Start of Turn:
- Pros:
- Effects like mist blocking vision will be immediately noticeable.
- Cons:
- Player can see enemy movement in territories he left.
- Player can still see all enemy movement in mist until the start of his turn. That will be just an annoyance.
- Really hard to make AI handle it.
- Non-intuitive.
Both Start and End of Turn:
- Pros:
- Some combined pros of both approaches.
- Cons
- Really hard to make AI handle it.
- Non-intuitive.
Each time unit finished its movement:
- Pros:
- Very intuitive.
- Spells like Mist immediately take effect.
- Cons:
- Less tactical depth: player cannot move a scout close to uncover enemy units, then move that scout away and nuke the enemy with some area of effect spell, that would otherwise harm the scout.
- Computationally intensive on large maps.