Recent advances focusing on the metabolic interactions within and between cellular populations have emphasized the importance of microbial communities for human health. Constraint-based modeling, with flux balance analysis in particular, has been established as a key approach for studying microbial metabolism, whereas individual-based modeling has been commonly used to study complex dynamics between interacting organisms. In this study, we combine both techniques into the R package BacArena (https://cran.r-project.org/package=BacArena) to generate novel biological insights into Pseudomonas aeruginosa biofilm formation as well as a seven species model community of the human gut. For our P. aeruginosa model, we found that cross-feeding of fermentation products cause a spatial differentiation of emerging metabolic phenotypes in the biofilm over time. In the human gut model community, we found that spatial gradients of mucus glycans are important for niche formations which shape the overall community structure. Additionally, we could provide novel hypothesis concerning the metabolic interactions between the microbes. These results demonstrate the importance of spatial and temporal multi-scale modeling approaches such as BacArena.