PDA

View Full Version : jabber for games


maddanio
06-15-2008, 11:35 PM
Hi,

A friend and I are coding up an online game. We were thinking of integrating it with jabber. So I would like to know if it is possible and how. So I will quickly scheme out what we need:

there will be players, they can play 1on1 or more at a time
there will be statistics held central (mainly scores, also list of available players, news, tournament info)

i.e. we need a way for players to connect to each other or in groups as in chatrooms and they should also be able to talk to a server (itself a jabber client). they should be able to chat and play simultaneously. so we would send text messages as well as game messages. i.e. effectively there would be two clients, the chat and the game.

the simplest way to do this would be to just do a chat client and filter out special messages, but I thought with all the extensible xmpp stuff it would be possible to properly register two clients with their own protocols? the server, if we do it with jabber, would just be one client, but with a special protocol.

is this possible? does it require support by the jabber servers (which would be bad...).

On the side: to make it more efficient I think peer-to-peer connections would help. Are they hard to do? Do they need special ports (nono for firewalls, corporate networks, hotspots I suppose)?

Thanks for any help

Daniel

noccy
06-18-2008, 08:36 PM
I like your idea, gonna try to give you some answers here :)

i.e. we need a way for players to connect to each other or in groups as in chatrooms and they should also be able to talk to a server (itself a jabber client). they should be able to chat and play simultaneously. so we would send text messages as well as game messages. i.e. effectively there would be two clients, the chat and the game.

Just create MUCs, Multi-User Chatrooms and send invitations to the players to join them.

the simplest way to do this would be to just do a chat client and filter out special messages, but I thought with all the extensible xmpp stuff it would be possible to properly register two clients with their own protocols? the server, if we do it with jabber, would just be one client, but with a special protocol.

Their own protocols? I'm thinking along the lines of the WoW Chat here, but whispers could be done using regular chat messages, where group chats could be done using dynamically created MUCs.

is this possible? does it require support by the jabber servers (which would be bad...).

On the side: to make it more efficient I think peer-to-peer connections would help. Are they hard to do? Do they need special ports (nono for firewalls, corporate networks, hotspots I suppose)?

That would be depending on your implementation :)

Cheers,
Chris

maddanio
06-19-2008, 12:22 AM
Just create MUCs, Multi-User Chatrooms and send invitations to the players to join them.


Ok, that should do it.


Their own protocols? I'm thinking along the lines of the WoW Chat here, but whispers could be done using regular chat messages, where group chats could be done using dynamically created MUCs.

Well, I was thinking actually for game-data exchange. I.e. We want game data (its not so much, a few events per second) _and_ chat over jabber. Can I use resources for that? I.e. me@jabber.org for chat and me@jabber.org/game for game messages?


That would be depending on your implementation :)
Chris
Well, I would like to use existing infrastructure, and not try to punch yet another hole through firewalls, routers etc. Like, use the same technique that file exchange uses (though i must admit i havent gotten file exchange to work in jabber yet).

Thanks for the answers

Daniel