swing set off the ground or directly on the ground
Typically it's suggested that A-frame play sets be firmly anchored in the ground to prevent tipover. A couple vigorous kids can impart enough force to tip a structure. Longevity takes a back seat to safety here.

Use lumber that's decay-resistant (I wouldn't have concerns about the new breed of pressure treated lumber), and either bury it sufficiently or weight it with concrete. Concrete should be below ground level to allow for softer material above.