There are some examples of troglodyte settlements like the Matamata underground houses and Tunisia, Africa, which uses the Earth's mass to protect themselves from the heat and the windstorms.
In fact, before he met a San, he had read an anthropological account by a fellow travel writer, Thornley Smith, who likened the San to troglodytes who fed on vipers and lived in holes in the ground.