Make sure that if your archer sees the enemy, the enemy sees the archer
On a square map, a line drawn between two units can run slightly different ways depending on which end you start from. The result is one side seeing a target that cannot see back, and players smell cheating. Here is how to draw the line so the answer is the same from both ends.
Why this works
A line drawn on squares has to choose a side whenever the true line runs between two of them, and the choice depends on which end you start from. If both questions always trace from the same end, they cannot disagree, so seeing is always mutual.
When not to use it
Wrong where one-sided sight is the point, such as a sniper in a tower, a unit in a bush, or a guard with a limited view cone. Then give each side its own rule on purpose. It also says only clear or blocked, nothing about low cover.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 4 common mistakes and the fix
- 22 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "Make sure that if your archer sees the enemy, the enemy sees the archer" (read_entry symmetric-line-of-sight-grid) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP