Forum BigDB Assigning Player Object Key before creating room connection

Discussion and help relating to the PlayerIO database solution, BigDB.

Assigning Player Object Key before creating room connection

Postby wbsaputra » October 25th, 2010, 12:30 am

hi, im creating lobby system for card games,
just wondering can i create player object key with connect user id on server side before creating room connection?
i'm trying giving player object default value example: default chips bonus when user first time join my game.
But this user must through room lobby first before joining game room, so i want display user object default value on lobby display. but the lobby system does not have room connection yet, so i can't send message to server?
is possible doing this without giving access to actionscript client for saving player objects?
I'm plan doing all DB object on server side. thanks for help
wbsaputra
Paid Member
 
Posts: 150
Joined: June 29th, 2010, 4:38 pm

Re: Assigning Player Object Key before creating room connection

Postby Oliver » October 25th, 2010, 12:44 pm

Hey,

You can set it up such that you can load your player object client side, but can't make changes to it. Just set the correct access rights for the connection you're using in the admin panel.

It sounds like the easiest way to do what you're describing, is to award the chips serverside when the user first connects, and "cheat" in the client side by displaying the default value if they haven't been assigned any chips yet.

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

Re: Assigning Player Object Key before creating room connection

Postby wbsaputra » October 26th, 2010, 1:30 am

yess, of course. why i'm not think of that. thanks.
also for the player key object i can create on server side too when user first joining room rights?
(using loadOrCreate PlayerObject)
wbsaputra
Paid Member
 
Posts: 150
Joined: June 29th, 2010, 4:38 pm

Re: Assigning Player Object Key before creating room connection

Postby Benjaminsen » October 26th, 2010, 8:27 am

The PlayerObject is automatically created when you load it the first time using loadMyPlayerObject (C# documentation reference)
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark


Return to BigDB