Hi,

I am working on a map with grid movement - that means: the battlefield is like a chess field, units have no "free" movement, they can move X squares in any direction, however, not diagonal (if you know the game "Fire Emblem", you know what i'm talking about). What i have to create is a system that shows me which squares are accessible to move to, there are also non-pathable squares that can hinder movement. On the screenshot you can see the unit (resembled by an X), blocked paths (black blocks), paths that you can move to (green dot) and paths that you could move to without blocked paths (yellow dot). The unit in the example has 6 movement. Until now, i didnt come up with a solution and want to ask you guys if there is a mathematical or warcraftish way to solve it

I am working on a map with grid movement - that means: the battlefield is like a chess field, units have no "free" movement, they can move X squares in any direction, however, not diagonal (if you know the game "Fire Emblem", you know what i'm talking about). What i have to create is a system that shows me which squares are accessible to move to, there are also non-pathable squares that can hinder movement. On the screenshot you can see the unit (resembled by an X), blocked paths (black blocks), paths that you can move to (green dot) and paths that you could move to without blocked paths (yellow dot). The unit in the example has 6 movement. Until now, i didnt come up with a solution and want to ask you guys if there is a mathematical or warcraftish way to solve it