Forum Multiplayer Sending a message to all online users.

Discussion and help relating to the PlayerIO Multiplayer API.

Sending a message to all online users.

Postby Blam » July 30th, 2010, 8:00 pm

I couldn't see a suggestions forum, so I'll just post here. My suggestion is being able to send messages to ALL users connected via your game key.

Such as: you go into your admin CP, chose your game, type in a message, hit "broadcast" and it sends a message to all connected users.
ex:
You could have something like this in your game:
Code: Select all
//Note: Client not connection, so you could use this out of rooms.
client.addMessageHandler("update",M:Message, function() { showUpdateMessage(M) });


And you would be able to log in and send the message:
"update" {1.10,"changelog"}

Which could then bring up a message indicating to all users playing that an update has been released and they should refresh/rejoin room (or force rejoin room, etc.)
Blam
 
Posts: 8
Joined: July 28th, 2010, 11:46 pm

Re: Sending a message to all online users.

Postby Oliver » August 2nd, 2010, 10:03 am

Hey Blam!

Thanks for the suggestion! I've added it to our "suggested features" list which we use when we decide what to build next.

Unfortunately what you're suggesting would not be trivial to implement, so i can't say that it will happen soon.

You can do a workaround however if you want: Simply have your serverside code periodically load a database object indicating what the latest version is, and send a message to connected clients if it changes.

Then you can use the web interface for BigDB whenever you change the version.

Best,
Oliver
User avatar
Oliver
.IO
 
Posts: 1159
Joined: January 12th, 2010, 8:29 am


Return to Multiplayer