. There is no standard answer anyway, to this question of space between two buildings. This question would fall under the zoning laws of the individual municipalities of the various states. You would have to research it locally.
However, the minimum distance that should be maintained between two adjacent side-by-side badminton courts is at least 4 feet on all sides. The standard measurements of a badminton court is 20 feet wide by 24 feet long. If such is used for residential buildings it could be okay.
This distance could contain grass and trees primarily to ensure clean air. This sort of calculation is probably taken into account when fixing a maximum number of people for a hall or a room. Incidentally what factors are used to determine this maximum number of occupants of a hall/ room/ meeting area? The spacing is primarily the duty of the builder who is a professional in the field of building. Although, spacing could vary a bit with jurisdiction, as a general guide, religion, tribe or enlightenment could tickle certain kinds of development that could introduce all dimensions in metres.
Minimum distance between detached dwellings from omp (outer-most projection) for fire separation should be 0.9m. For attached dwellings, one hour fire-rated wall must extend full height of building. Common distance from omp habitable space should not be less than 4.5m in height to boundary which is 1.5m, therefore 3m between buildings. Sometimes different rules apply where there are windows.
Recommended distance where there are windows on side elevations of adjoining detached dwellings should e between – 3.5 – 4m between windows, more if the windows are bathrooms, “home theatres” and WCs – for obvious reasons.