Skip to main content
GameDev.net gamedev.net

PRO Tired of ads? Read GameDev.net ad-free and help keep the community independent with GameDev Pro — $3/month.

Layers

Layers

Calin
Calin
DreamLand editor · · 1 min read
1,805 0

To get units avoid the enemy units by a safe margin I have to bake the enemy units LOS into the obstacle map. First I'm saving the LOS of each unit into a separate layer. Then I'm merging all the layers and save the result into the obstacle map. Ranged units can attack workers from distance. I'm also saving the areas from which a worker can be attacked. One layer per worker. Then I'm merging those too. When a ranged unit has to attack a worker it moves to a tile from which a worker can be attacked provided that tile is not found on the enemy LOS map (the tile is not in the range of an enemy combat unit). The resulting navigation map looks like this:


Discussion

Loading comments...