-
-
Notifications
You must be signed in to change notification settings - Fork 48
Imports piece sets from lila #3
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
Imports piece sets from lila #3
Conversation
|
I know that SVGs are strangely difficult in flutter, but it's worth noting that using pngs here uses almost 20 MiB, and in lila it takes about 2, not to mention the added difficulty in importing. I'm sure it can be cut down as I don't believe we're using the higher resolution versions, but it might be worth looking into alternatives. |
|
You could probably chop 10-15% off storage costs for these by using run length encoding rather than LZW as they're 1 bit images with 1 bit alphas. If you care to check if it's worth it - just cd to piecesets, and run What's the difficulty with flutter and SVGs? Are you guys concerned about rasterization cost? The flutter_svg package worked well when I tried it. |
|
I'd rather keep the PNG than to rely on flutter_svg. And we have the perf gain because no rasterization. Not sure I want to have all the pieces loaded into the app by default thought because it means 20MB more into the app bundle, (without counting the pngs of the boards). In the previous app one would download them on demand. A bit more work but definitely doable. On the other hand, if we download them on demand we'd loose the For the record I used the svgexport node package to convert With simple shell commands like: Looking at your script it seems you converted merida as well, so there's no diff between the python and node tool apparently. |
|
I guess we could add 20MB in the app size, but it would be nice to also know the size of all the board themes. I'll make an issue for that. |
|
Most modern games, even indies, contain 100+ MB of graphical assets. It's good to keep an eye on but 20 is fine! |
I used the following python script (requires python 3 and the cairosvg package):
Please note that this script chokes on the
disguisedpiece set, I opened them and the're just text files with the textb.svgorw.svg. This makes me think that these were supposed to be symlinks that git didn't clone correctly. Since it was one piece set I decided to clean it up by hand.