When I was in Mauritania, most of the "compound" walls were made of an adobe type brick and mortar. Along the tops, to keep people from hopping over walls they embedded all sorts of sharp and jagged things, whatever they could find (broken glass, metal, etc). While clever players could circumvent this as well, I am sure you could think of some deterrent up there to keep them from running on top of the walls.