-
Notifications
You must be signed in to change notification settings - Fork 45
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Store piece sprites as vector graphics #69
Comments
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 |
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. |
We could combine them in one big JSON object or something. |
We don't even need to combine them all. If 95% of games are classical, we can just merge all the classical piece's svgs into one request, and only send the other fairy pieces when needed |
All pieces have already been converted into SVG's and been compressed. All we need to do from here is:
|
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.
The text was updated successfully, but these errors were encountered: