I'm trying to create an online version of Connect 4 with MQTT, where 2 people can play against each other, or spectate other people. It's barely finished, heck it's barely even started! But I still want to share with you these animated cursors I made. They're SVG and the hourglass isn't finished.
To the left is the cursor sheet, and to the right is how they will be animated.
I'm planning on using the forum API to retrieve the user images from players' usernames. "But how will you get their username?" someone in the audience replies. The SciSnap! library added the "Getters and setters" blocks in there, which allows people to avoid JavaScript extensions as a whole, which means that you can see, for example, jens start a match with bh, with their username and respective forum images!
Good news is that it is really simple (at least to what it looks like at first). Just paste in https://forum.snap.berkeley.edu/user_avatar/forum.snap.berkeley.edu/usernameHere/###/#####_1.png or so (I'm not that tech-savvy about files stored in the domains OK?). Replace usernameHere with the username and the #s don't seem to matter. One caveat is that if the username does not use a custom avatar, it appears as a generic icon instead of a letter avatar (like the one I'm using).
The a denotes the letter to be displayed. Can be anything, could be a digit, could be a Unicode character as well, but is transformed uppercase if it's a lowercase letter.
5f8ce5 is the background color of the avatar. Can be any hexadecimal color.
One thing I didn't take into consideration is the fact that Snap! and the forum aren't in the same place, so the canvas gets tainted. I can't get the image contents with the url[] block and base64 encode it, because base64 from scratch is kinda (extremely) slow and there's no built in base64 block! So this will be super fun to try to make work.
I used Boxy SVG and made guidelines on how they'll be tiled, and traced a reference, which is just the first frame of the row. I used the Blob tool to create the inky lines.
If you import the cursor sheet image into the app, you'll notice it even has appropriate names.