Awesome - thanks! Are you thinking of turning that into an app that can be installed?
Just to add - I notice that Mario (and maybe some other stuff?) is a high res bitmap of something pixellated. If RAM usage becomes a problem you could just use the low-res image and do:
Or something like that to make Bangle.js do the scaling for you.
It was just a work of few hours so I didn’t think more about performance. So yes I will take your suggestions.
This is an BangleJs app and as of now hosted on my Bangle App Store. Will do a PR .
Thanks everyone for having look on my watch face.
@Gordon, thanks for your suggestion, I have reduced the image size and it is now much lower.
As a next step I am trying to animate mario jump. My code is available as APP here .
When you press BTN1, mario will jump. But I am not happy with the jump animation performance on actual clock. It is bit flickering.
An in othr example, like Flappy Bird, Horse Race, or in Trex, animation is smooth.
Any suggestions to make it better?
I'd say the best bet would be to use
Bangle.setLCDMode("120x120")- this uses an offscreen buffer and doubles pixels. You then just call
g.flip()when you're ready and it updates without flicker.
It also means that you could hopefully avoid having to use
scale- because everything is basically already scaled by 2 anyway. There's also
80x80for 3x scaling
It does mean that you can't use Widgets, but you weren't using those anyway.
Just a note but after uploading the app and jumping, I see:
Uncaught ReferenceError: "brick" is not defined at line 8 col 21 g.drawImage(brick,i,200);
in the console
Sorry!! just fixed the issue.
Ok, great!! I will modify my code for 120x120 mode.
I am happy to share my updated version on Super Mario Clock 2.
This is a performance improved version for LDC mode 120x120. Added some animation in BTN1 click.
Image resources are new further optimized for size and improved for quality.
That's great! Looks a lot better!
Just wanted to publish my work.
Source code is available
Check on emulator:
YouTube Demo: https://www.youtube.com/watch?v=RHXvka_Jxj0