Player's Default Name

Monkey Forums/Monkey Programming/Player's Default Name

ElectricBoogaloo(Posted 2014) [#1]
Tonight I'm thinking about possible adding Leaderboards to my games, but that requires a lazy-man's input method for the player's name.
On iOS I can ignore this completely, as GameCenter already does the player-name stuff, as well as giving us that nice pre-made GUI for it all, but all other targets I'm not entirely sure where to begin.
I'd like to have a default name ready and waiting when the player boots the game. I'm pretty sure Android should allow that, somewhere, and OUYA definitely knows who the player is (it's on the upper left of the menus), but I'm not entirely sure how I'd go about grabbing that info.
As for GLFW, HTML and other targets, I've not the foggiest what I could or couldn't try to do.

If anyone has any suggestions as to how I could possibly achieve these sorts of things, feel free to let me know!
Thanks!


Nobuyuki(Posted 2014) [#2]
The Plus namespace does this. I don't know if it requires G+ to be installed, but I seem to remember from some other thread that this may not be the case.

https://developers.google.com/+/mobile/android/people


Nobuyuki(Posted 2014) [#3]
(duplicate post)


Samah(Posted 2014) [#4]
osu!stream ties your scores to your Twitter account instead of your Apple ID. The developer did this because he found the ranking system in Game Center to be too limiting, but he still wanted players to be able to record their scores against an authenticated (and theoretically unspoofable) username. Note that the scores are still stored on his own server.
You might want to try something like that for any targets that don't (easily) provide that level of unique identification. Otherwise you will need to create your own user database and include an account creation interface.
Integrating with Twitter/Facebook/Google/etc. would require calls to their API (most likely RESTful). Has anyone tried this yet?