I would like to request a way to get the current device's serial number or a similarly derived unique identifier.
My end-goal is for my game to use or hash this identifier locally to generate a QR code for the user to scan on a smartphone. Then the user would pay for an "unlock code" and then I'd verify the serial number offline on the Playdate device. Heiko's post here reminded me of KiezelPay which has a similar unlock mechanism but uses the paired device's network capability to verify over Wi-Fi.
Playdate has an unofficial/private Wi-Fi API and my goal is not to suggest that Panic make this an officially supported API for developers. (While, yes, it would be cool, from what I've seen it's definitely a larger ask.)
I'd like to offer some kind of receipt validation tool for this in the future, but yeah, this would be a small step in that direction that we could ship a lot faster. I'm a little wary of games accessing the serial number directly, just for paranoia's sake.. And is it a potential problem for two games to see the same identifier? Since we don't have unique identifiers for the games themselves that's probably moot.
Yeah, I like the idea of a user id instead, so that the purchase isn't tied to a single device. I'm not very familiar with the OTA update code.. We might already be storing a user id on the device for that.
For sure, I also don't think game developers should have direct access to the device's serial number. I think some kind of salted one-way hash of the logged in player's account ID should be enough? For example, I see on my Mac that the Playdate Simulator has a file at /System/Data/cachedAccountInfo.json with that value as a UUID, separate from the user's username (for me that's a numeric string but I've seen some people with custom usernames).
Please add my vote for some api accessible id. Personally, I want it to make closed betas where my app just wont function if you are not on the blessed list.
A UUID seems like it would be useful. Every Playdate already has a unique MAC address… which is already discoverable (meaning it is not a secret)… a hash of that would be a unique # per PD
if once we will have network API, the door is open for multiplayer games. and the user id is really a good thing for automatic profile generation, and user identification.
One more +1 from me. I’m looking for an easy way to encrypt some game data so that it’s unique to the device it’s running on. Right now the options seem to be a) encrypt identically for everyone or b) generate and save an encryption key along with the encrypted data. Either way it’s just obfuscation, not true encryption, but using a system identifier to produce a stable key feels cleaner.
We're targeting this for 3.0, kicking it down the road a little so we have more time to think about it. It seems like there are a lot of different use cases and they don't all line up with each other. There's going to be some tradeoffs to sort out here.