Organisms in phototropic microbial communities survive by exchanging oxygen and carbon dioxide with each other. Using a combination of computational modeling and experiments, researchers found that two different kinds of microorganisms can coexist in either in a cooperative or competitive fashion depending on resource availability, the environment, and the microorganisms’ genetic background.