18 upvotes, 2 direct replies (showing 2)
View submission: I'll miss you /r/place
I imagined that Place first send a snapshot in the first load then small packets with only coordinates and colors, and so each pixel would take just around 5 bytes. When I checked the WebSocket connection in the dev tools I noticed that it, in fact, send URLs to image files. I wonder why.
Comment by pithecium at 04/04/2022 at 21:15 UTC
27 upvotes, 1 direct replies
The updates are sent as PNG images that are transparent except for the changed pixels. PNGs have compression built in so that's pretty efficient.
Comment by AkitoApocalypse at 04/04/2022 at 21:16 UTC
2 upvotes, 1 direct replies
Yeah, I was working on a project for heatmaps and timelapses (though I never found the GraphQL query to retrieve previous boards from timestamps) and was shocked they were sending an entire PNG image every quarter second instead of coordinates. I'm assuming they used some canvas which they just "pasted" the new image over but it's still such a drag.