Another good idea is to combine training and playing.
Example: If you take your dog for a walk in open space, like a park, the mountain, a beach etc, and your dog starts walking away from you. Then a good thing to do is not to call him/her back, you can turn and start walking to the opposite direction. As soon as your dog understands that you are not close s/he will come back to you. As soon as s/he does that you can praise and pet him/her. This is a very good exercise in order to make your dog follow you when s/he is unleashed and also a great way to show him/her who the leader is in a very nice and effective way.
Examples of unacceptable ways of playing with your dog include:
Teasing, slapping, wrestling, chasing, allowing him/her to bark at you. You should not allow your dog to demand that you play with him/her. Also you should not use your hands as a toy, allowing him to nip, and tug-of-war.