Page 1 of 1
Creating group of rooms at runtime as client or visitor
Posted: 25 Oct 2013, 10:08
by wulei
About creating group of rooms at runtime as client/visitor | About spectators in rooms
Hello everyone,
i have some questions in mind:
First, how can i create a group of rooms at runtime as a client ?
Because currently i suppose that there is a kind of array in which are add freshly created group of rooms
Then when a room is created, this one can be registered in an existing and available group of rooms
After some research i know that group of rooms are just a unique string ID and we can subscribe / unsubscribe rooms to group of rooms

My second question is:
Is a basic room type can have spectator ?
I know that game room can have.

I need when a client is joining a room be not able to send public message but only receive public message. SO is the spectator concept can be a solution ?
i mean
when a spectator is joining a room, is this one can't be able to send message but only receive it in the concerned room ?

Unless i don't develop the SFSRequest publicMessage or the grapic user Interface to write, or perharps should i see about privileges with SFS ?
If you have any suggestion or idea, i am interested and more if you can link some dcumentation about an idea
Thanks for any answers,
Wulei
Re: Creating group of rooms at runtime as client or visitor
Posted: 25 Oct 2013, 12:54
by Lapo
First, how can i create a group of rooms at runtime as a client ?
Because currently i suppose that there is a kind of array in which are add freshly created group of rooms
Then when a room is created, this one can be registered in an existing and available group of rooms
After some research i know that group of rooms are just a unique string ID and we can subscribe / unsubscribe rooms to group of rooms
Room groups are not supposed to be create dynamically from client side.
You can from server side, however, by simply creating a Room with a new groupId.
In general groups are not meant to be dynamic because your application should already "know" which categories of Room there will be. This is not mandatory and groups can be added at runtime, but that's the general idea.
Is a basic room type can have spectator ?
I know that game room can have.
No. As you said game Rooms have that feature. Game Rooms are not restricted to hosting games, you can use them for whatever other activity you have in mind that requires spectators.
I need when a client is joining a room be not able to send public message but only receive public message. SO is the spectator concept can be a solution ?
i mean when a spectator is joining a room, is this one can't be able to send message but only receive it in the concerned room ?
This is not clear.
Can you explain what do you mean by "When a client is joining a Room"? You mean before he's chosen a Room to join? If he's supposed to receive Public messages he must already be in another Room. Public messages work only inside Rooms.
Explain the flow, please.
Re: Creating group of rooms at runtime as client or visitor
Posted: 25 Oct 2013, 13:29
by wulei
Thanks for answers about the two first questions !
Here is the third question clarified :
Is a spectator can both receive and send message in a room ?
In fact i have no idea of what can do and can't do a spectator in comparison to a player inside a room ?
So i have supposed that a spectator can not send public message and can just be notified of public message event.
I just know that
a spectator is a particular class of user that can join a game room but can't interact with the game.
Is
can't interact with the game
means is not able to send request such as public_message_request ? And can he receive notification about events ?
Hoping having been clear
Thanks again
Re: Creating group of rooms at runtime as client or visitor
Posted: 25 Oct 2013, 14:21
by Lapo
wulei wrote:
Here is the third question clarified :
Is a spectator can both receive and send message in a room ?
In fact i have no idea of what can do and can't do a spectator in comparison to a player inside a room ?
So i have supposed that a spectator can not send public message and can just be notified of public message event.
In a Game Room spectators and players are simply differentiated by a "player ID". Those who have such
playerID > 0 are players, those who have
playerID < 0 are spectators. It is entirely up to you who gets to do what. Typically in a game you will allow players to send moves etc... while spectators will only receive them. It could be done with PublicMessages as well.
More on this here:
http://docs2x.smartfoxserver.com/Develo ... chitecture
Hope it's clear.
cheers
Re: Creating group of rooms at runtime as client or visitor
Posted: 25 Oct 2013, 14:37
by wulei
Yeah that's clear thank you very much !
As i would say in french "tu gères la fougères"
which means "you are the man" with rhyme
Re: Creating group of rooms at runtime as client or visitor
Posted: 25 Oct 2013, 15:05
by Lapo
LOL
