They both need oxygen for this process and are usually limited by the oxygen concentration in their microenvironment, as you can see in this simulation. Oxygen is displayed as blue color (liquid oxygen (T < 90K) has a blue hue). Regions of oxygen depletion are evident as lighter shades of blue. Oxygen diffuses into the biofilm from the bulk liquid (dark blue patch), separated from the wall surface to the right of the hydrodynamic boundary layer.
Biofilm bacteria typically produce slime, technically known as Extracellular Polymeric Substances (EPS). This slime acts as glue and defense mechanism against predators who easily gulp down single cells, but can't swallow the whole slimy mess. You can switch on copious slime production by one of the bacteria to see what effects this might have on biofilm growth. EPS blobs are drawn as yellow-green circles.