Although astronauts don't play basketball on the moon — the low force of gravity there would make for a fun game — hoops is played almost everywhere else. In prison yards. On ships. Chevy Chase's Fletch character in the movie Fletch — ignoring the wisdom of The Brady Bunch — used his living room as a court. You really need little more than a flat surface roughly the size of a classroom and at least 20 feet of vertical space.
Your own driveway
The fact that basketball and the automobile were invented within 15 years of one another is indeed serendipitous. The advent of the auto meant the arrival of the driveway, which can serve a dual role as a basketball court. And the garage has long been an ideal place upon which to mount a backboard and rim.
Putting up a hoop in the driveway or backyard
Installing your own basketball hoop in or near your driveway can cost anywhere from $50 to $250, the high-end hoops being mobile units mounted upon dollies that require nearly no assembly. Before you decide to install a court at your home, first determine whether your driveway or other concrete or asphalt surface is level. If it's relatively level, the next step is to choose whether to purchase a pole that you will plant in the ground, and upon which you will mount the backboard and rim; or to simply mount the backboard and rim on or above a preexisting structure, such as a garage, sloped roof, or barn. (A common taunt when your shot is off is, "You couldn't hit the broad side of a barn!" Well, now you can.)
Neither option is better than the other. Simply assess your own property. If you select a pole, be sure to plant it at least 24 to 36 inches in the ground and support it by fixing it into the ground in a bed of cement. Allow the cement to set for 48 hours before mounting the backboard on the pole.
Mounting a hoop on the garage
From a cost point of view, the less expensive approach is a universal mounting bracket, which costs about $20. This bracket allows you to mount the backboard to a garage wall with the hoop at the desired level. The advantage of a universal bracket is that you can mount it on a sloping roof, a side wall, or a pole. To that, you attach the backboard, which should already have a rim attached. You can buy a quality backboard and attached rim for about $40.
School yards or playgrounds
School yard and playground hoops offer full-court game possibilities and so much more. It's where you meet new people — hopefully upstanding types. You also face better levels of competition. (The driveway court is fun, but face it: Uncle Leo can't go to his left.)
The school yard is also where children learn to be grownups in a positive sense. They learn how to fit in with a group, settle disputes ("Call the foul before the shot misses the basket!"), and stand up for themselves.
Youngsters should always be accompanied — if not by an adult, then at least by an older sibling — when going to shoot at a school yard. Also, no matter how badly you get beaten on the court, don't ever take your basketball and go home as a retort. Crybabies are not welcome at the school yard.
Community centers
When the Village People sang "You can hang out with all the boys" in the classic hit "YMCA," they probably didn't have basketball in mind. But hoops facilities at community centers, such as the YMCA and YWCA, have existed for many years and are a step up, in terms of supervision and organization, from the school yard.
Most community center facilities are indoor and have someone in charge. These facilities have house rules — such as "winners remain on the court, losers must sit out" — that lend order to the scene. These facilities are also prime arenas for the older generation, players 25 to 35, looking for a weekly workout. Warning to those under 25: After the legs go, players hack (foul) more often. Also, they seem to remember themselves being better shooters than they actually were, hoping for, yet not having, any chance of winning.