Just like their sometimes human hosts, bacteria need to eat, migrate, communicate, reproduce, and interact with their neighbors. Thus, to study bacterial behavior, it is necessary to create a three-dimensional host environment that allows for these processes to occur—and ideally in a way where one can position different bacteria at will. Connell et al. tackle these challenges using a microscopic three-dimensional printing strategy. Bacteria of interest are trapped by mixing them with a warm solution of gelatin that is then allowed to cool. By including a photoexcitable molecule in the solution, the gel can be selectively cross-linked to form pockets of bacteria that form free-floating, adjacent, or nested communities. Removal of the unreacted gel creates a set of porous channels that can be used for the transportation of food, waste, or signaling molecules. The mechanical properties of the gel can be tuned through the addition of bovine serum albumin, which cross-links with the gelatin. The authors fabricated a range of gels with mixtures of Staphylococcus aureus and Pseudomonas aeruginosa, which often form coinfections in human patients, to determine how bacterial concentration and location affected each of the populations. When a dense shell of P. aeruginosa was fabricated around a core of S. aureus, the former enhanced the survival of the latter when exposed to the antibiotic β-lactam.