Re: minisphere
Reply #26 –
So something interesting I found out: Duktape uses reference counting for garbage collection, only falling back on mark/sweep if refcounting fails to free the object--i.e. circular refs. Which means a call like the following:
LoadSound('bgm.ogg').play();
...will cause the garbage collector to finalize and free the sound as soon as play() returns (meaning this snippet is effectively an expensive no-op under Duktape), whereas, say, SpiderMonkey, the sound might actually stick around for a while. Something to keep in mind.
As for actual minisphere news, I've implemented about half of the Sound API (NOT the SoundEffect API though, that's a different beast entirely), meaning minisphere can load and play music and sounds now! It definitely helps that the learning curve on Allegro (and even Duktape, for the most part) is practically non-existent, which is awesome. Now I remember why I used to love coding in C. Sure, it's ridiculously easy to shoot yourself in the foot (although perhaps not quite so bad as C++), but the language is so simple that, for the most part, it ends up being self-documenting.