XMPP multiplayer games: should rivals be kept as a contact list?

I read all 484 Professional XMPP pages and read countless forum topics about XMPP + registries, and this issue is still what I'm struggling to solve. I'm looking for information on best practices, so at least I know which direction to go.

I am creating a cross-platform (web, iOS, and Xbox) platform game. Each player can have up to 100 different matches, active at any time, so that they can easily miss from one game, where she does not get to where she is.

The game will have a lobby where your list of active games will be displayed, as well as the name and online status of each opponent for this game (you can have up to 3 opponents, only 4 players per game).

In addition, each player will have a friend list available from a different area, which also displays online status.

I use XMPP behind the scenes, completely transparent to the players, no one will ever log in with the Jabber client or something like that. I have full control over how information is displayed and used.

The main aspects that I use XMPP to solve are: notifications when an adversary has moved, having seen my friends in online statuses and seeing the online statuses of their opponents and text chat in the game.

So, here, where I start to experience problems: it is obvious that your friends list will be contacts in your list so that you can see their online status. But what about opponents? These are usually random opponents with whom you will play only one match and never again - but your game with them can last up to two weeks.

Remembering that everything behind the scenes (for example, automatic confirmation of a subscription, etc.) is the best way to do this - add each opponent to another group in your list during the game, and then delete them after the game is over? So you get presence notifications when this player is online? Or is this the case when PubSub can be used?

I also considered the use of multi-user chat, so I always had access to every online status of users without a subscription, but this seems far from effective when at any time there can be up to 20k players online. Definitely sounds like battery power on mobile devices.

My other solution is to use shared list listings. Create a roster list for each game and assign this list to each player. Then delete the general list list after the game is completed.

+4
source share
3 answers

I would choose Pubsub here. Of course, this means that you also need to work on the server side.

Send directed presence to opponents. This will allow them to see your presence.

+3
source

I would like to use multi-user chat for each game and your own extension for the MUC protocol for processing messages about the state of the game (the opponent made a move). A user can have a list of his friends on a β€œglobal” level, but he can still communicate with his opponents (and gain a presence) using the MUC level (unless they decide to add them as a friend).

See also: Pubsub Compared to MUC

+2
source

I agree that using MUCS (instant) would be better in this scenario. If you need to clean pubsub unwanted subscriber sites, this will definitely be a pain in the ass.

0
source

All Articles