• Would creating the script in the browser help with memory?

    Yes, if you're not having to load a bunch of JSON, but instead the 'draw' function just has a bunch of draw commands I think that will help a lot.

    needs about half of the available RAM on bangle2

    While that's fine, that is still quite a lot - 10 times as much as some watchfaces.

    Is the script code accessed directly from flash,

    Worth checking http://www.espruino.com/Code+Style#other­-suggestions but yes - functions have their code stored in flash memory and are executed from there.

    Can I actually avoid getting the image data into RAM until it is needed there for drawing?

    If the images are stored as binary files in Storage, you can actually render them direct from flash - g.drawImage(require("Storage").read(...)­)

    unofficial de/compiler for Amazfit BIP watchfaces. I have a watch face I like for my BIP S that is now easy to port

    Now that would be amazing. If you could making it compatible with the watch face compiler format then we could suddenly get loads of cool bip watchfaces!

  • While that's fine, that is still quite a lot - 10 times as much as some watchfaces.

    The simpleanalog one has more like 15%, which would be about the bare minimum for something useful. The digitalretro watchface is aimed at being a feature complete demo and has nearly all possible weather codes covered which are currently 48 images at 63*64 pixels.

    if the images are stored as binary files in Storage,

    Since I don't want to clutter the file system with 50-100 files, maybe writing offset and lengths to the json resources file and only the actual pixel data into one big concatenated "image" file would be a reasonable way? Reading directly should still be possible using offset and length parameters.

    -
    The Amazfit decompiler creates a very similar json, but it numbers all extracted images in series and references them with a starting image and a count. Thats bad for doing changes before recompiling, since inserting an image means renaming all files after it and changing all references. But it is probably easy enough to either automatically convert the referenced "blocks" of images to directories for the new format or support this naming scheme optionally. Both ways should lead to at least somewhat working automatic ports. Changes would still need manual modifications. At that point renaming the files and using the hierarchical structure would be better. The current feature set is probably enough for some of the watch faces, but there are still features left.

    It seems there was development on the Amazfit side of things, since I last tried that. The last version of this editor that I tried was completely unusable and broken. That seems to be a lot better now. Actually the format seems to have had some changes too, will have to take a closer look.
    https://v1ack.github.io/watchfaceEditor/­

About

Avatar for Gordon @Gordon started