I have implemented the mask and view capabilities. I’m calling this version 2. Here’s a sample screenshot of how it looks in action:
The two masks are identical and use the same image to paint over top of the entire board. I set the opacity to 0.3 for the view hex pictures so the player can see the terrain under it. I also manually set the display value of each enemy unit to match the value of the view mask.
Here’s the code: Battlefield One Code V2
You can go directly to my website to play the game as is: (temporarily down).
I’ve played the game a few times and it is a bit more challenging than the first version without the masks. I think my next enhancement will be adding a variety of different unit types. I might have to enlarge the playing board to allow more playing pieces.
Note: I have recently upgraded my website to use MVC4 and .NET 4.5. I have refactored my code to make the game work on MVC4. Click here to try it out.