Forum Multiplayer RoomInfo Property - created time

Discussion and help relating to the Player.IO Multiplayer API

RoomInfo Property - created time

Postby leoban » January 31st, 2012, 8:18 am

I notice in the Room list of the admin panel, there is a "Created" field with the date and time a room was created. How can I access this? It isn't listed as a property of RoomInfo in the documentation. I supposed I could create my own creation time property, but why do that if one already exists. Thanks.
leoban
 
Posts: 14
Joined: January 31st, 2012, 8:08 am

Re: RoomInfo Property - created time

Postby Benjaminsen » January 31st, 2012, 11:46 am

As you noticed yourself, the date of creation is not exposed in the API. The initial reason for this is to keep the total size of a list rooms request as small as possible and let developers like you decide which properties to add to a new room.

I will however file a nice to have request to make Date / Time an optional property.
Have more questions? Join us at #player.io on the freenode irc network. Making something cool with Player.IO? I would love to talk! My Skype handle is q-rious
User avatar
Benjaminsen
.IO
 
Posts: 808
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: RoomInfo Property - created time

Postby leoban » January 31st, 2012, 7:13 pm

Thanks for the response. Since it's a pending nice-to-have feature, I'll go ahead and make my own data property unless told differently.
leoban
 
Posts: 14
Joined: January 31st, 2012, 8:08 am

Re: RoomInfo Property - created time

Postby Benjaminsen » January 31st, 2012, 7:16 pm

leoban wrote:Thanks for the response. Since it's a pending nice-to-have feature, I'll go ahead and make my own data property unless told differently.


I suggest you do :)
Have more questions? Join us at #player.io on the freenode irc network. Making something cool with Player.IO? I would love to talk! My Skype handle is q-rious
User avatar
Benjaminsen
.IO
 
Posts: 808
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: RoomInfo Property - created time

Postby wbsaputra » February 1st, 2012, 6:18 am

i just got something weird, Room Data sometimes not updated. I use his room info to build list lobby.
This method call on every user join or left.
With as3 i parse RoomData.Users to extract player id in room and player count
But sometimes was unable to read object. Any clue why this happen? is there any limit object string in RoomData object?

private void updateRoomData()
{
String s = "";
int p = 0;

foreach (Player ply in Players)
{
p++;
s = s + ply.ConnectUserId + "~";
}

RoomData["Players"] = Convert.ToString(p);
RoomData["Users"] = s;

RoomData.Save();
}
wbsaputra
Paid Member
 
Posts: 116
Joined: June 29th, 2010, 4:38 pm

Re: RoomInfo Property - created time

Postby Benjaminsen » February 1st, 2012, 12:24 pm

wbsaputra wrote:i just got something weird, Room Data sometimes not updated. I use his room info to build list lobby.
This method call on every user join or left.
With as3 i parse RoomData.Users to extract player id in room and player count
But sometimes was unable to read object. Any clue why this happen? is there any limit object string in RoomData object?

private void updateRoomData()
{
String s = "";
int p = 0;

foreach (Player ply in Players)
{
p++;
s = s + ply.ConnectUserId + "~";
}

RoomData["Players"] = Convert.ToString(p);
RoomData["Users"] = s;

RoomData.Save();
}



What happens when you are unable to read the room data string? Does it just fails or?

In that context, room data is not guaranteed to be live. IE it can take a few hundred ms before the change appears due to caching.
Have more questions? Join us at #player.io on the freenode irc network. Making something cool with Player.IO? I would love to talk! My Skype handle is q-rious
User avatar
Benjaminsen
.IO
 
Posts: 808
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: RoomInfo Property - created time

Postby wbsaputra » February 1st, 2012, 1:08 pm

Ic, when it fails RoomData object is exists but no value to read just empty string, or maybe just null object.
Ok i try another method. How about save this room stat object to BigDB and read at list room method?
I have permanent room object id in BigDb. What best method do you suggest?

Also i notice something weird with concurrent user online count in admin panel, it shows i have 220 rooms and 3304 online users. It doesn't make any sense cause I am set only 10 user max can join in 1 room. How your system count this?
wbsaputra
Paid Member
 
Posts: 116
Joined: June 29th, 2010, 4:38 pm


Return to Multiplayer



cron