Nick Gravelyn:I think he was thinking what I was thinking. Simply get the list of sessions, enumerate the players, and manually look for the friends. Just as a workaround until the full presence is implemented.
The problem there is you have to actually join the session before you get back a NetworkSession instance. Before you join, all you have is an AvailableNetworkSession, which is basically just a handle and address of the host, and only includes limited metadata.
Also, there's no way to "get the list of sessions". Matchmaking doesn't return the entire list of all sessions, just a selection of the ones that seem most appropriate (matching session properties based on whatever you requested, similar player skill levels, reasonable geographic proximity to minimze lag, plus a ton of other LIVE heuristics based on whatever seems like it might give the best gameplay experience). So even if you could enumerate the players in the session, there's still no way to be sure the one your friend happens to be in would even be in the list returned to you by the matchmaking query.
LIVE tries extremely hard to avoid ever having a "give me everything" API: it always goes for "give me a filtered list of just a few carefully chosen results". The return-everything-and-filter-it-on-the-client route is not good for server scalability!
Nick Gravelyn:I would love to see the full LIVE presence get taken care of as it is, in my opinion, a major part of multiplayer games. I rarely play online without at least one friend with me, so seeing that functionality in XNA's networking would be a huge boost.
I agree 100%.
--
XNA Framework Developer
blog -
homepage