Extension: QR Code ... again

While creating this topic, I just learned that @peli already did this: QR Code extension. :man_facepalming:

But in case you were dying to make QR Codes in Arcade, and you didn’t already know about @peli’s extension, have I got the QR Code generating extension for you: https://github.com/jacobcarpenter/pxt-qr-code! :sweat_smile:

Two blocks:

  1. make a sprite that displays a QR code for the entered value
  2. make an image directly

I haven’t tried reading these off of an actual hardware device yet, but it seems to work great from the simulator to my phone.

I’d love to see a game that incorporates QR codes as a mechanic somehow (perhaps as some kind of hidden information for one player while taking turns, or giving an answer to a puzzle w/out showing it in plain text or something…)

4 Likes

You could consider using

const buf = Buffer.fromUTF8("hello")

to get the UTF8 bytes

1 Like

Are strings in Arcade all already UTF-8 internally? The code I’m using to convert to UTF-8 bytes handles conversion from UTF-16 encoding (the runtime internal format of strings according to the standard). But maybe MakeCode TypeScript already does this differently.

Yes it is handled. Here is our writeup about strings: https://makecode.com/js/values

1 Like