I have pea gravel in my duck run, and my ducks used to "hate" me and hide inside when I was hosing the place down. They got over that, and I started messing with them. As I spray, I'll shoot some in their direction. At first they'd give me the crazy eye and run away. Now they wait for me to do it, and follow the hose. I've taught them an annoying trick that was supposed to be my entertainment! 
Our garage is detached from the house, and sometimes when we come home, I run behind the garage and hide. Husband let's the dogs out, and they fly back into the back portion of the yard. I wait until I hear their feet near the garage, and I jump out and go "Boo!". The first time Ricca flipped out and went off on me, and I had to say "Ricca, it's me!". Logan didn't even bat an eye, he just got happy. Now, they run wide of the garage and look for me first, even if they just greeted me on the porch... in case someone else decides to scare them.
We hid behind trees when hiking too, more to teach Ricca to keep an eye on us than to mess with her.