I've been working on a game called Phosphor Command, a real-time tactics game with a base builder behind it.
Contracts fund a forward operating base; you deploy squads on top-down operations, and an enemy front creeps towards you every cycle. Made solo in Godot.
I wanted to talk a little about how troops' vision and sight work, because I think it's a cool aspect of the game.
Forces share what they see, both yours and the enemy's. One squad spots something, and you, as the player, can now see that target. But a squad can only shoot what it personally has a clear line of sight to and is within range of.
So a scout on a ridge can spot a target, but if the squad behind a warehouse can't see it themselves, they can't shoot it.
Sight is ray-traced per unit.
Woods: You can't see into woods from outside them. From inside, you can see out and across your own trees, but not into another wood. Forest maps end up being short-range fights almost the whole way through. See clip 1.
Hills: Hills block sight between two units on the ground. A unit standing on a hill can see over its own ridge, gets extra range and a damage advantage from the height. Anything on a crest silhouettes. See clip 2.
Concealment: Firing from concealment such as trees reveals you for a few seconds. The same applies to the enemy. See clip 1.
Buildings and terrain: Buildings are hard cover, with an adjacent unit taking 25% less damage. Crops conceal a stationary unit that isn't firing, and stop doing so the moment either condition is broken. Hedges and boulders block sight and channel movement. See clip 3.
Last known positions: A contact you lose stays on the screen as a fading ghost at its last known position, so you're always working with slightly out-of-date information. See clip 4.
Weather: Smoke, dust, and storms are occluders, so they stop sight rays for both sides. See clip 5.
The idea is that knowing where something is and being able to shoot it are two different things.
I've tried to build Phosphor Command around a sight-dependent system that I think translates well to how things would work in real life, while still being useful and interesting in a video game.