🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Generate unique ID per user

Started by
11 comments, last by swiftcoder 6 years, 4 months ago
On 2/1/2018 at 4:43 AM, Octane_Test said:

User ID Requirements:

 1. Independent of the device's platform
 2. Offline implementation (no communication with any servers)
 3. Without sign-up process

 

On 2/1/2018 at 4:43 AM, Octane_Test said:

EDIT:

There are lot of responses to use UUID/GUID. Generally, this approach looks fine but I am looking for a solution which can generate same User ID even if the user reinstall the game.

I think with your edit you are completely out of luck with these requirements.  Cannot use any device based ID (MAC address, UUID/GUID, etc), no communication to servers to check for existing/duplicate IDs (which eliminates #3 as an option anyway) and now you want it to generate the same User ID even after a reinstall so anything date/time based is also out.

"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin

Advertisement
On 2/1/2018 at 4:43 AM, Octane_Test said:

There are lot of responses to use UUID/GUID. Generally, this approach looks fine but I am looking for a solution which can generate same User ID even if the user reinstall the game.

If you want to deal gracefully with cases such as the user migrating to a new phone, then you are absolutely going to need to integrate with platform-specific APIs. Both Apple and Google seem to recommend generating a GUID on first install, and then storing it via their platforms' respective secure storage APIs, so that it gets backed up via the cloud and transferred to new devices.

Tristam MacDonald. Ex-BigTech Software Engineer. Future farmer. [https://trist.am]

This topic is closed to new replies.

Advertisement