For a game I am building, I am running into a couple areas where I would like to generate a UID with relative safety from collisions. In my current setup I am logging unique data about game instances (performance data from my alpha tester group) and each game played is tagged with a unique id. This logged data is beamed up to my web server via AJAX. When building the logging system, I needed a UID, and could not find a system expression for this. In a pinch to release, I ended up having my php code generate a UID ( http://php.net/manual/en/function.uniqid.php ) and then beam it back to the client, then the client beams that back with the game data.
I would rather generate a UID on the client side in the game, than on my server. I have read about some algorithms that would do a decent job that I could either attempt to program in the event sheets or extend a custom object myself using the SDK (probably the way I would go). Before I do either, I wanted to consult the community to see how others have done this?
So, how have you generated UIDs?