Sprite masks can be used to selectively show or hide portions of a sprite. A few examples of how one might use this:
- Flashlight - A flashlight in a black screen, where you can see the level and character if they are inside your flashlight circle. Everything outside your circle could be black.
- Splatter - Paint/blood splatter. A paintball hits a player, and you generate a splatter pattern on the hit spot. Instead of half of the splatter being on the character and half floating in the air, you could have the splatter only be shown inside the player's body. This would mean you could see the portion splattered on the player, but the rest would be hidden.
- Secret passageways - Secret passageways that you can't see until you get close - a circular sprite mask around your player only reveals hidden things when you get close.