Adding a Player/UserName

Just curious if there a way to have the player enter their user name at the start of the game that can be recalled throughout the game (and eventually loaded to the leaderboard with the player score)?

thank you in advance (The Corona community Rocks!)

Hi,

Stuff like this should be “persistent”, meaning that even if the app is closed/exited/quit, when the user comes back, their name should still be in memory. This previously required saving files to the app’s sandbox and then retrieving them later, but… fortunately for you and all Corona developers… simple stuff like saving a few data bits is now easily done with the “system.setPreferences()” call:

https://docs.coronalabs.com/api/library/system/setPreferences.html

And later, it can be fetched by “system.getPreference()” (i.e. when you want to display it or send it somewhere):

https://docs.coronalabs.com/api/library/system/getPreference.html

Best regards,

Brent

Hi,

Stuff like this should be “persistent”, meaning that even if the app is closed/exited/quit, when the user comes back, their name should still be in memory. This previously required saving files to the app’s sandbox and then retrieving them later, but… fortunately for you and all Corona developers… simple stuff like saving a few data bits is now easily done with the “system.setPreferences()” call:

https://docs.coronalabs.com/api/library/system/setPreferences.html

And later, it can be fetched by “system.getPreference()” (i.e. when you want to display it or send it somewhere):

https://docs.coronalabs.com/api/library/system/getPreference.html

Best regards,

Brent