Forum Multiplayer Chat available in lobby?

Discussion and help relating to the PlayerIO Multiplayer API.

Chat available in lobby?

Postby Swoopjockey » May 1st, 2010, 10:45 am

Is there a way to allow users to chat in the lobby before creating/joining rooms or do they need to join a room first? I think the Nonoba API has this sort of feature.

Thanks,
Matt
Swoopjockey
 
Posts: 21
Joined: February 5th, 2010, 2:17 pm

Re: Chat available in lobby?

Postby Benjaminsen » May 2nd, 2010, 4:02 pm

The nonoba api forces people into building games following a special model. Here in how the lobby looks and behaves. This is not the case with Player.IO, thus we don't even force how you lobby should look but just give you an example.

Or in other words, if you want a lobby chat, simply make one :)
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Chat available in lobby?

Postby Swoopjockey » May 3rd, 2010, 2:52 am

OK, maybe I didn't write my post well enough. I didn't mean that because Nonoba has this "feature" that Player I.O. should have it as well.

What I mean to ask is, is there a way to send chat messages between players without first connecting to a room. The chat I am using for my game comes from the Tic Tac Toe example. The Chat.as file has a callback _connection which is used to send messages to and from the connected room.

However, is there a way to send messages from players before connecting to a room? For example, client.multiplayer.send("message", int, String, etc.)? And how would I configure the server code to handle these messages?

Or do I need to setup a "chat only" room that all players connect to from the lobby?
Swoopjockey
 
Posts: 21
Joined: February 5th, 2010, 2:17 pm

Re: Chat available in lobby?

Postby Benjaminsen » May 3rd, 2010, 6:16 pm

Hey Swoopjockey

The suggest way is simply to create a separate servertype for your lobby chat and connect users to that.
Basically you can just use an empty server with only the chat hooks in it for this.

Notice here that Player.IO can be connected to several rooms and server-types at the same time. Something else that is new with Player.IO

/Chris
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark


Return to Multiplayer