Galaxy formation in space