This story originally appeared in bioGraphic, an online magazine about nature and sustainability powered by the California Academy of Sciences.

Every summer evening, deep in the Hill Country of central Texas, hundreds of thousands of Brazilian free-tailed bats (Tadarida brasiliensis) pour from the mouth of a limestone cave. The pungent smell of guano and the rush of sound and air from so many wings beating at once is an experience that truly overwhelms the senses. Then, just like that, it’s over—in a matter of minutes, members of the entire colony have emerged from the cave and disappeared into the dusk for their nightly foraging flight.

To the naked eye, in real-time, the colony exodus is a blur of wings and bodies moving too fast to track. Yet somehow, the entire colony manages to exit the cave, night after night, without traffic jams or (many) casualties. How do they achieve this incredible feat? Scientists Nickolay Hristov and Louise Allen set out to answer this question. Using high-speed video cameras, they have captured these events — and interactions among individual bats — in spectacular detail. Now, frame by frame, they are discovering that it’s not always necessary for nature to come up with the perfect solution — just one that’s good enough.