With Barcelona enjoying sunshine for many months of the year, it's common to see people practicing sports within the high rises of the building blocks that surround. There are many table tennis tables dotted around the city, which are permanently open and often in parks or green areas. You can take your bats and ping pong balls and play at any time.
Another such outdoor game which is a little more popular with adults and the older generation is "Petanca". Petanca is a kind of bowls game which is played on flat, often sandy pitches. The players can play alone, but usually play in teams. The game involves throwing a small wooden/plastic ball or "boliche" and then each team has to get the closest to that boliche with their metal balls, which are around 8cm in diameter and weigh around 700g. The technique of throwing the ball is to release the ball with your hand/fingers facing the direction you are going to throw, shielding the ball - so you gain backspin and it stops quicker. The one closest to the wooden ball gets a point, and the first to three is the winner.
It's great to see groups of mixed ages getting together for a quick game - you can be surprised at any time of day with a petanca game going on, and there are plenty of areas designated for the game, with perches to hang jackets and bags. Sagrada Familia has a fair few courts/playing surfaces in front of the Nativity facade inside the park, and there are numerous other locations in the city too. If you get the chance, stop and watch a game for a few minutes, it's great fun. For a full list of the rules, the Federation of Petanca in Spain has a website (in Spanish).
A great way to visit the city is also using the Barcelona Tourist Bus system, which takes in all the main sights. And for accommodation in the city, try apartments for rent in Barcelona as an alternative to a hotel room.