This was the product of a 24 hour game jam at George Mason University. The theme was "Echoes", so I pitched an idea about a baby whale looking for it's mom using sonar. Still not sure if that's how Whales work, but we fell in love with the idea.
For the sonar, I knew I wanted to use a simple flood fill algorithm. The tricky part was actually designing it in such a way that it stopped at walls. Eventually, I settled on using a second set of black tiles placed on top of the level to act as a mask. When running the flood fill, I would fade each tile hit by the algorithm. The solution worked, and in combination with some talented artists, and some incredibly adorable sound design, we pulled off A Whale of a Time with 3 hours to spare.