Implementing a simple NFC card reader within a reasonable timeframe

Godot Version

v4.6.1.stable.mono.official [14d19694e]

Question

I’m in charge of creating a small game for a convention, and this year we had the idea of using NFC cards to let players collect items around the venue, however, I kind of hit a roadblock when it comes to actually implementing this.

As far as I can tell, Godot cannot interact with the NFC reader of Android or iOS phones at all, and the only library I found that has anything to do with NFC is 4 years out of date and seems to only work on Android. A large amount of our attendees use iOS devices, so this isn’t an option.

All we would have to do is read a specific NFC cards UID and send it to the server, so we can connect a card to a specific attendee. Obviously the “easy” solution is to just release a second application that does just that, but that’s not ideal. Having to maintain 4 different apps (The game for both Android and iOS, then the scanner app for both Android and iOS) would be a horrible idea, we’re operating on a single new developer account for each platform, so a rejected or problematic app submission is a real risk we want to minimize.

Can anyone point me in the direction of how this could be achieved? I don’t need a lot of functionality at all, I just want to be able to read a cards UID and send it off to a server, the user would already be authenticated at that point.

Sorry I can’t help you with the NFC reader, but have you considered QR codes instead?
There is this guy with tutorials for both Android and iOS (I haven’t tried these, but looking at the comments it seems to work).

2 Likes

I’ll look into this, thank you, but I hope I can convince the board members to do this instead of NFC :sweat_smile:

2 Likes

QR code would be much safer too. Having everyone with NFC on at all time is an opportunity for direct hacking and social engineering.
Granted, one could plant QR codes with URLs to phishing sites…

1 Like

Not in our case. The only reason we need nfc is to be able to connect X attendee to X badge. Then we have special hardware around the con space where attendees need to tap their cards on to receive items.

Also there’s no reason to “hack”, every attendee has their own badge. All the nfc part is used for is to collect items for the game. If someone steals someone else’s card they can’t do anything with it.

1 Like