Forum QuickConnect Deleteing PlayerObjects

Discussion and help relating to PlayerIO's QuickConnect feature, including Facebook Connect and Kongregate Connect.

Deleteing PlayerObjects

Postby lostwake » September 17th, 2010, 10:46 pm

Whats the best way to remove a playerObject?
Or perhaps whats a better way to do this?

I have a game where I want the user to be able to initially sign-in as a guest, after playing I want to give the user the option to "Register an Account" to have their current score saved in the PlayerObjects table.

As of now when the user click to sign in as a guest I create a PlayerObject called Guest+Random# and password Guest and I treat this as a normal User. Unfortunately I do not know the best way to make a new user, transfer the data, and delete the guest user.

If anyone has insight into this please let me know.

Thanks in advance.
lostwake
 
Posts: 5
Joined: August 21st, 2010, 4:41 am

Re: Deleteing PlayerObjects

Postby Benjaminsen » September 19th, 2010, 6:29 pm

PlayerObjects are stored in the table PlayerObjects, so you can use a simple deleteKeys call to delete the guest object.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Deleteing PlayerObjects

Postby lostwake » September 19th, 2010, 9:07 pm

Thank you for the quick response.
lostwake
 
Posts: 5
Joined: August 21st, 2010, 4:41 am

Re: Deleteing PlayerObjects

Postby lei » January 10th, 2011, 5:11 pm

Hi,

I'm aiming for largely the same thing, that is, Guest users' objects being deleted when they leave the game.
Unfortunately, i'm not certain what amounts to leaving the game, rather than just a room. I tried using the addDisconnectHandler method, but i got no results for simply closing the game window.

What would you suggest is the best way to ensure those objects get cleared?

Thank you for any advice.
lei
 
Posts: 14
Joined: December 1st, 2010, 9:49 am

Re: Deleteing PlayerObjects

Postby Benjaminsen » January 10th, 2011, 7:58 pm

lei wrote:Hi,

I'm aiming for largely the same thing, that is, Guest users' objects being deleted when they leave the game.
Unfortunately, i'm not certain what amounts to leaving the game, rather than just a room. I tried using the addDisconnectHandler method, but i got no results for simply closing the game window.

What would you suggest is the best way to ensure those objects get cleared?

Thank you for any advice.


The far easiest way would be to delete the room on the server when UserLeft is called.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: Deleteing PlayerObjects

Postby lei » January 10th, 2011, 8:30 pm

I assume 'room' is meant PlayerObject?

The game in question is http://nonoba.com/jevishan/enlinev2 , for reference.
Guests should be able to switch rooms without losing data, so just UserLeft seems inadequate. And also in case they quit in the lobby, don't want their remains lingering around.

Are there other ways?
Can i periodically have BigDB cleared of Guest objects perhaps?

Thanks for the reply!
lei
 
Posts: 14
Joined: December 1st, 2010, 9:49 am

Re: Deleteing PlayerObjects

Postby lei » January 10th, 2011, 8:44 pm

Also, is there anything like nonoba QuickConnect planned? As i have a boatload of achievements set up there, and it's a bit of a waste.

And is there a way to delete a single QuickConnect user, rather than an entire group?
lei
 
Posts: 14
Joined: December 1st, 2010, 9:49 am

Re: Deleteing PlayerObjects

Postby Benjaminsen » January 11th, 2011, 10:52 am

You could add a timestamp to your guest objects and delete them using a deleteRange request.

As of now there is no QuickConnect for Nonoba planned.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark


Return to QuickConnect



cron