I’m programming a network multi-player game and I decided to use XMPP for communication over the internet – since it should be quite good and didn’t find any other better alternative.
I wish to use openfire XMPP server – if you know something better, please let me know. So I want to implement the Openfire plugin, which would accept all client messages and do something with them:
- Forward messages to destined client.
- Grab something from the database and return the data to the original client (like player list).
What I need in the game:
- Getting a player list. I can achieve this with the UserManager#getUsers() from Openfire.
- Storing the player details on the server: the player name, points, life, group to which the player belong. I don’t know if I can define a simple java class within openfire, so that it would automatically save it to the database – I would also need to provide the database functions to store the data into mysql by hand.
- Sending a message to an offline user, so that it waits there until the user logins – then sends the message to the user, informing it that some other player is challenging it to a game.
Is there any better way of doing that? If not, can Openfire do what I described?
Thank you
Yes , this thing can be done by openfire ,
and if you want to use another opensource server , you can find it from here http://xmpp.org/xmpp-software/servers/