There are many ways to implement fog of war.

# Using an actor with hole in it
# Using Image API to create attached-to-screen image

The implementation I was looking for was a multitude of holes. Not just an actor that followed the main character.

The first attempt was made using a large actor that was following the 6 characters on screen: Terrible FPS

The second attempt was to use the Image API.
That produced better results.
But that was on my main system which was much better equipped than most and iOS and Android versions lagged and sometimes crashed.

Then I followed an advice from Hectate and SadiQ over at the Stencyl Forums.

Create a small mask and grow it in size!

That proofed to be the solution:

Create event:


set game attribute [isHide] to true
create FogOfWarActor at x:-1000 y: -1000 at Front
For each [actor of type][FogOfWarActor]
set game attribute [CircleImage] to [Image from [actor of type]]
set game attribute [SceneImage] to blakn image with w:48 h: 48)
Comment: This blank image is small but we will grow it!!
attach [value of attribute [sceneimageinstance] to screen at 0,0

Every [0.1]
if [ vlaue of attribute [isHide] ]
fill value of attribute [SceneIamage] with [black-color]
if value of game attribute [SceneImageInstance] not = [null]
remove [value of game attribute with [sceneImageInstance] from parent

if [value of game attribute [isHide] ]
for [actor of type ] [xxxx]
clear [ value of attribute [SceneImage] using [value of attribute [CircleImage]] at [x of actor type] / 10] -1 , y: [[y of actor type] / 10 -1
set game attribute [sceneimageinstance] instance of [value of attribute [SceneImage] ]
if [ value of game attribute [isHide]]
grow [value of [SceneImageInstance] to w: 1000%, h: 1000% over 0 using none
otherwise
grow [value of [sceneImageInstance] to w: 0%, h: 0% over 0 using none
attach [value of game attribute [SceneImageInstance] to layer [name] : [middle] at 0,0 at Front