phatkidsoftware lennaert emoaeden
Hello! Have you tried using TileMaps for this?
I guess it might be a decent solution, as it redners insanely fast, campared to using a lot of sprites:)
You can do something like this:
Add a TileMap object to a separate layer, right above the layer with a map you want to cover with FOW.
Create a single black 16x16 tile(or any other size you want, down to 1pix, it will still work relatively fast:))
Add event on layout start -> set all tiles in TileMap object to 0(that will fill our tilemap with black tiles aka FOW, use "set tile range" action for this)
So, we have our FOW and we just need to set up it's interaction with the Hero.
Use something like : Hero moved -> erase FOW tiles at defined range from hero position.
I hope you get the idea:) This method should work pretty fast and clear.
I don't have time to make an example capx right now:( Will do it later.
Untill then, check this topic. It's not exactly what you need, but it gives an idea on how to use tilemaps.
Also there are examples of how to erase tiles at defined radius and defined position.
Hope that helps!^_^