YeOldeDM / lets-godot-roguelike

A tutorials series on how to build a simple roguelike in the Godot Game Engine
MIT License
24 stars 5 forks source link

Update Thing visibility on player map_pos_changed #30

Open YeOldeDM opened 7 years ago

YeOldeDM commented 7 years ago

When the player changes map position, calculate a FOVmap, which should be an array of Vector2 map cells which are considered "visible".
Iterate through all nodes in the "things" group and compare them to the FOVmap. Hide anything not in this map, and show anything that is.