What about only inviting your DS's friend over on a dry day and taking them to the park after school so that they can get rid of all their excess energy before tea?
Then maybe a little pirates/lego/board game before DS's friend gets picked up? IF they've had a run around already they may be more likely to play clamly and share/take turns?
If my DS and friends don't want to play the same game I insist that they play the friend's choice first (he's our guest so naturally gets first choice) eg for 20 mins and then my DS's choice for eg 20 mins.
Or, you could say, guests choice before tea, DS's choice after tea.
My DS's friend came the other day after school and they played Hide and seek / tag for almost the whole time - it was exceptionally noisy but they had a great time.
Making a den is another one - that goes down well and is neutral. You could have it ready for when they come out of school/back from the park.
I find sometimes that other parents expect their DC's to stay too long at my house or for my DCs to spend too long at their houses.
They'll often suggest picking up at 6:30pm but by the time they've got shoes on and I've had brief chat with parents it's 6:45 and I'm left with an exhausted son who is too tired to get ready for bed. (Normally we start getting ready for bed at 6pm and in bed for 7pm).
I've put my foot down now and suggest 5:30pm as a pick up which works well for us. They're a lot less likely to want to share and be reasonable hosts if they are too tired anyway, and I don't see the point of dragging it out and it ending with them falling out becasue they're tired.
I've had some raised eyebrows when I've mentioned that time but I'm not bothered.
Also if they're 15 minutes late at that time (which has often happened) it doesn't matter.