I don't know if my system is necessarily the best. Since the wolf is 256x256, I can't check every single pixel without causing some lag issues in stencyl. So what I did instead was have a loop adding pixels to a list and checking the list for their color. Stencyl (or haxe or flixel or whatever) uses hexadecimal color coding. Here are some examples:
#000000 is black
#FFFFFF is white
#FF0000 is blue
However, the system does not relate this directly and instead converts it to a number.
black = 0
white = 16777216 (actually 16777215 or 16777214 in most cases)
blue = 256
Hexadecimal is 16 values per digit. So the white is 16^6. Blue is 16^2.
So this looping occurs checking pixels above, below and on the sides. It scans for anything with color and counts that as a collision. So I can have the same functions as with a normal platformer... If onground = false you cannot jump. If the loop for the bottom of the actor picks up color, set onground to true. etc.
The other side of this is the digging and other image adjustments. As the stencylpedia article on image API states, masking is a huge drain on system resources. I've found it is best to keep an image below 10,000x5,000 pixels when using a mask. Otherwise, you do hit upwards around 1 second of lag in the game.
Another thing I tried doing was putting the background pictures into the "extras" folder and loading them as the scene is created. Unfortunately, this caused a background color to automatically be inserted. It also formed a weird 32 pixels shadow at the point of overlap. I had to take the less optimal solution of have the background as actors when creating the scene. It does not shove in a background color or have the shadow overlap. All I need to do is cycle through animations as the scene is originally drawing.
FYI, the world is also procedurally generated. So you will never have the same world if you play the game a second time.