This is kinda out there and beyond my skill level, but I have been wanting to be able to take photos of players and use those photos as sprites throughout a game. I got as far as the real camera extension to show the camera on screen and the render to sprite extension that allows me to capture a portion of the screen and save it into a sprite… but then I’m stuck. I know the sprite just has a temporary image, but is there any way to make it persist across scenes? Something like saving it as a base 64 global variable that I could load using the custom image extension to be able to place the image into masked sprites (and even send the image to other players as a variable)… But I’m at an impasse as to how saving a sprite into a base 64 variable could happen, if it can happen. Anybody have any ideas/thoughts/better solutions for this?
You could look at saving the image data to storage by going through it pixel by pixel and storing those pixels in a 2D array (i.e. an array of arrays)? There’s a read pixel extension you could use for this.
that’s an interesting idea. cheers
sweet! you inspired me to dig in deep, and last night made an extension that reads the values starting at x,y for a given width and height and stores it as a selected text variable in base64. The most kickass part is since they are stored as text, I can send them as mqtt payloads so now i’ve got multiple devices sharing sprites with each other that are photos of the players. Thanks so much for the nudge!
Now publish that extension
There will be others who would make use of such a feature.
This is amazing, great work!