Open tsevasa opened 1 month ago
This would be great, and a huge performance boost!! As long as we can convert the vector graphics back into textures on startup!
All piece's have now been converted to an SVG! Next we can take steps towards using those svgs and re-forming the spritesheet on the client-side with them!
See discussion here https://discord.com/channels/1114425729569017918/1261070585476288674
I imagine we would group all the classical pieces into one http request (as svgs are just text afterall, there has to be some way to split them into individual svgs eith javascript afterward), and other fairy pieces may or may not be in groups! Atleast, a pair of a black and white piece should atleast be merged into one request.
Lichess stores all its piece sprites as vector graphics (see here, for example) and each piece is less than 1KB in file size. In contrast, our spritesheet is a png file and takes up 1MB in total.
We should also store piece sprites in svg format.