Forum QuickConnect simple, fb, kong: ConnectUserIds vs usernames

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

simple, fb, kong: ConnectUserIds vs usernames

Postby cog » January 12th, 2013, 12:01 pm

Hi,

You are probably all facing this: when you register with the API and login, your "username" gets prefixed with whatever login system you're using. The thing is, displaying the "simple<username>" instead of <username> across the game is a bit ugly. On the other side, using solely "<username>", there could be distinct players named identically, leading to all sorts of problems.

What's your take on this? What is the "best practice" here?
cog
 
Posts: 74
Joined: November 17th, 2012, 1:40 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby ASH1138 » January 12th, 2013, 2:41 pm

Cache the _simpleCOnnectUserID in the game, and BigDB, but when you display the player's name, replace ("simple") with ("").
Problem solved.

In my RTS game, I replace "simple" with "Seargeant", "Commander" ,"General", "Marshal" etc, but I often forget which fields I replace and get all sorts of stupid bugs where the bigDB key is wrong.

PlayerIO should get rid of the prefix, and share the player database across all platforms, such that a guy on FB cannot sign in with "John" when there is already a "John" signed in with simpleConnect.
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby Benjaminsen » January 12th, 2013, 6:31 pm

connectUserID's should not be used for determining the username of a user. Basically it's incidental that the username is used as part of the connectId for QuickConnect users. Eg for FB the format is FBxxxxxxx where xxxxxx is the connect id.

Userdata such as nice usernames should be stored in BigDB
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby cog » January 12th, 2013, 6:47 pm

Well, to make things clear for everyone, I'll pick an example: the lobby.

Let's say "john" from facebook, "john" from kongregate and "john" from simpleUsers join the lobby.

Displaying:
- simplejohn
- fbjohn
- kongjohn
...is obviously not very user-friendly. I mean, if my username is "john", I want to be called "john" also in the game.

However, if you do so, you'd end up with 3 "john"s in the lobby ...which is also problematic. If I send a whisper to "john", to whom is it sent? etc.

So, what's the most advisable? To send them to different lobbies? I.e. one lobby for all simple users, one for all FB users, one for kong? ...or is there another take at this?
cog
 
Posts: 74
Joined: November 17th, 2012, 1:40 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby Benjaminsen » January 12th, 2013, 9:00 pm

Personally in my game Everybody Edists, I send users trough a custom implemented username migration where they have to choose a unique username disconnected from how they login.

Similar to how you have a login in WoW but create charters with unique names.
Benjaminsen
.IO
 
Posts: 1444
Joined: January 12th, 2010, 11:54 am
Location: Denmark

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby Henrik » January 13th, 2013, 3:29 pm

Also note that Facebook users don't have usernames, they have an uid and their real name. So their connectUserIds look like "fb1005321051153" and are pretty boring and not suitable to display, and their real names are obviously not unique. So if you want unique display names for Facebook users, you *have* to ask them for it in your game, and store it on the PlayerObject or similar.
Henrik
.IO
 
Posts: 1838
Joined: January 4th, 2010, 1:53 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby ASH1138 » January 15th, 2013, 1:50 pm

Henrik wrote:Also note that Facebook users don't have usernames, they have an uid and their real name. So their connectUserIds look like "fb1005321051153" and are pretty boring and not suitable to display, and their real names are obviously not unique. So if you want unique display names for Facebook users, you *have* to ask them for it in your game, and store it on the PlayerObject or similar.


I think if thats the case, then cog should simply forget the FB or Kong connect and simply authenticate everyone via simple connect,and replace "simple" with "".Coz I mean, if users have to type in their game name again after signing in via FB, its double work! :|
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby Henrik » January 15th, 2013, 11:18 pm

ASH1138 wrote:I think if thats the case, then cog should simply forget the FB or Kong connect and simply authenticate everyone via simple connect,and replace "simple" with "".Coz I mean, if users have to type in their game name again after signing in via FB, its double work! :|

The whole point of Facebook authentication is that the users never have to type anything to access the game, they just click the Facebook app and they're in. And asking for a display name, once, in a Facebook game is not asking users to do a lot of work.

But if you use the SimpleUsers authentication, users have to register, pick a username and password, and remember that username and password every time they want to play the game. That is a lot more work for the users to do.
Henrik
.IO
 
Posts: 1838
Joined: January 4th, 2010, 1:53 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby ASH1138 » January 16th, 2013, 7:58 am

Henrik wrote:
ASH1138 wrote:I think if thats the case, then cog should simply forget the FB or Kong connect and simply authenticate everyone via simple connect,and replace "simple" with "".Coz I mean, if users have to type in their game name again after signing in via FB, its double work! :|

The whole point of Facebook authentication is that the users never have to type anything to access the game, they just click the Facebook app and they're in. And asking for a display name, once, in a Facebook game is not asking users to do a lot of work.

But if you use the SimpleUsers authentication, users have to register, pick a username and password, and remember that username and password every time they want to play the game. That is a lot more work for the users to do.


Ok, but the user would have to log in via FB or Kong again and again. so its the same :P .

FB and Kong can have remember me, yes, but I could also store cookies to remember me via simpleconnect.
Just a statement. ;)
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby cog » January 16th, 2013, 9:46 am

Never underestimate the laziness of users... ;)
For some, just seeing a registration form makes them go away.
cog
 
Posts: 74
Joined: November 17th, 2012, 1:40 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby Henrik » January 16th, 2013, 11:09 am

cog wrote:Never underestimate the laziness of users... ;)
For some, just seeing a registration form makes them go away.

Exactly, we recommend that you try to delay these things as long as possible, instead of requiring users to fill out forms first.

So, use Facebook and Kongregate QuickConnect to have users automatically authenticated, if you have simple users, see if you can allow people to play a match as a guest, and only require them to register afterwards if they want to keep their score or XP gained or whatever.

And if you want your players to have a unique display name, don't ask for that until it's absolutely necessary. Grey out the chat and ask them to pick a name only if they want to chat, or give them a randomly generated name and tell them they can change it if they want to.
Henrik
.IO
 
Posts: 1838
Joined: January 4th, 2010, 1:53 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby ASH1138 » January 19th, 2013, 8:48 am

Henrik wrote:
cog wrote:Never underestimate the laziness of users... ;)
For some, just seeing a registration form makes them go away.

Exactly, we recommend that you try to delay these things as long as possible, instead of requiring users to fill out forms first.

So, use Facebook and Kongregate QuickConnect to have users automatically authenticated, if you have simple users, see if you can allow people to play a match as a guest, and only require them to register afterwards if they want to keep their score or XP gained or whatever.

And if you want your players to have a unique display name, don't ask for that until it's absolutely necessary. Grey out the chat and ask them to pick a name only if they want to chat, or give them a randomly generated name and tell them they can change it if they want to.

Er, ok. How do you implement a guest? Im my game, all players have inventories, and the inventories are stored in playerObjects, and playerObjects are only created when players log in! If they didnt have inventories, they wouldnt be able to land any troops and play the game!
ASH1138
 
Posts: 285
Joined: November 17th, 2012, 2:29 pm

Re: simple, fb, kong: ConnectUserIds vs usernames

Postby Henrik » January 19th, 2013, 11:58 am

ASH1138 wrote:Er, ok. How do you implement a guest? Im my game, all players have inventories, and the inventories are stored in playerObjects, and playerObjects are only created when players log in! If they didnt have inventories, they wouldnt be able to land any troops and play the game!

You don't need to store the DatabaseObjects, just keep them in memory on the client. And when the user has registered, then you save it to BigDB.
Henrik
.IO
 
Posts: 1838
Joined: January 4th, 2010, 1:53 pm


Return to QuickConnect



cron