Saturday, April 18, 2020

Heat Maps for Hot Zones

I've been working on developing "Heat Maps" for the AI opponent to better manage situational awareness. The areas in "red" indicate the extended range of a particular unit and the hexes it can target with it's longest range direct fire ammunition.

I'll work this function into the AI system for determining these hot zones. The computer will calculate overlapping areas of "hotness" and be able to better determine risk through identified areas of safety, danger and retreat. Here are a couple of sample shots of a single unit on the board...

A Soviet T-34/76 M43 on the ledge scouring the terrain for German presence.
It can fire its GP weapon at a range of 27 hexes.

The T-34 in the above screen is sitting on a hill. The longest range that the Soviet unit can fire at is 27 hexes. Its general purpose (GP) weapon has a penetration level of 2 at that range...

At extended range (27 hexes), the T-34 can fire its GP weapon.

The heat map will calculate the line of sight to each hex on the map, up to and including the unit's maximum range of it's weapon it can fire the farthest. The T-34 has multiple weapons, but it's GP weapon can fire the farthest.

I am able to drag and drop a unit to any location on the map and view exactly which hexes are within line of sight of its maximum ammunition range. There are a lot of surprises that pop up here and there, revealing locations that otherwise might never be discovered using the tabletop map. It's actually a great way to identify any problems with my line of sight algorithm.

The T-34 moves into Kurvha. Notice that line of sight passes through the streets of the town.

Eventually I'll have multiple units display their lines of sight. Any overlapping areas will be displayed as a darker shade of red (or other colour). Each hex will receive a "score", indicating how many times it has been overlapped. If a hex has a high overlap score, it will indicate a very high area of danger for the enemy. The AI will try and avoid these areas unless absolutely necessary.

There are some edge cases that I still need to work out. Terrain such a gullies, hedgerows and streams aren't quite ready yet, as there are a few anomalies. Once I have these figured out, I'll post a demo video :)

That's all for now. Until next time!

No comments: