It've been a long long time. How have you been?
Meanwhile I have been studying, working on some things (you can also see from the finally linked Works page), some of which I am going to highlight in next few days here.
If you are working with HaxeNME, you might have noticed that compiled JS/HTML5 applications do not necessary work same as other platforms. Or don't work at all. Or don't compile because of some uncommon unimplemented method that you've used. Continue reading
And as code base is accumulating "tricks" by multiple contributors, it does not necessarily remain entirely stable.
For example, if you've decided to clear your BitmapData-based 640x480 buffer via BitmapData.fillRect, you are making a huge mistake - the function is not just doing this pixel-by-pixel, but also via ImageData API.
Overall, this article is dedicated to substituting Browser/Jeash part of NME by your own library in JS compilation.
A bit of a trouble, isn't it? For most purposes,
it'd suffice to check for file time change and refresh the page in the browser.
So might as well do that with help of AutoIt.
Looks of gadget on desktop, in according pane, and on it's settings screen.
So I've randomly found out that Windows 7 (and Vista too) gadgets are written in HTML+JS+CSS.
Next thing I did was writing my own gadget. So this comes.
'Time is Ticking' is a minimalistic stopwatch. As such, it's purpose is to allow measuring for how long you were doing (or not doing) specific thing. Can be motivating.
Gadget can be considered optimized (does operation and a redraw once per second when on, is entirely idle when off), features customizable backgrounds with ability to specify your own (navigate to %USERPROFILE%\AppData\Local\Microsoft\Windows Sidebar\Gadgets\TimeIsTicking.gadget\image and add 160x32 PNG images to be able to chose them by-name in settings), and is pretty nice-looking overall.
For best experience it is recommended that you have font Dejavu Sans Mono installed, so digits would display appropriately.
To avoid accidental triggering, pause\restart buttons require double-clicking them to react.
Not much of informative demonstration, but is cross-platform and shows performance.
If you've noticed, multiple systems are better at drawing single large images than lots of small ones.
Same applies to HTML5, meaning that filling a 640x480 canvas with 40x40 images using two for() loops is not exactly a good thing to do each frame.
Common solution to this problem is to create a 'cache' image that would hold a tiled version of image to be drawn easily.
That means drawing image W*H times only once in a while.
However, actually you can do even better than this.
Video credit: 'asdfmovie song by LilBruceWayne'
As you may know, HTML5 standard includes <video> tag support.
This adds some
crazy interesting possibilities that can be used in games as well.
A common wish is to have a video playing as part of game or as its background overall.
Here I'm going to explain methods of doing this in Tululoo.