Click here to Skip to main content
15,888,008 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello, I have complete a maze game that a character walks arounds, collects things and shoots enemies. The game is produced entirely dynamically. I now want to add a fog of war where the character can only see whats around him on a certain circle radius. I have created the images and background images using sprites/movie clips.

My original idea was to create 5*5 black squares over the entire map and have them all running an eventlistener to see if they are hit or not and change the alpha to 0 if they are hit. But I think that it might bog down the game with too many EVENTs active. Is there a better way to do this?

Thanks.
Posted

1 solution

mainMovieClip.mask=someCirlcleLightShape; seemed to work nicely.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900