The effect of density dependence on community structure