Spatial effects in social dilemmas