Communities arise spontaneously when a group of people find themselves together with a common purpose, common values, common moment in time, or they just enjoy each others' company. If those elements aren't present, you just have a bunch of individuals sharing space. If they are, a small group forms, they invite others who share their values, and the community grows organically. The physical plan and organization can affect whether a community develops, but nearly all interventions appear to be negative. You can kill community, but only its members can grow it.
Lots and lots of people have tried to engineer community, from everyone who failed at building a Web 2.0 social-networking startup to colleges that manipulate their housing & dining arrangements to apartment complexes with "community rooms" and scheduled events to the huge planned Chinese & Soviet megacities that were supposed to house millions but basically got nobody.
Community always starts with individual humans, authentic emotions, and a time and place. A lot of people think that by supplying the time & place they'll get the community, but it doesn't work that way. People and emotions come first.