Many species form mating swarms of males, and in some of these, competition for females is extreme. Although many species (as larvae) have a strong association with water, even within a single family there may be a trend toward semiaquatic and terrestrial habitats.