Re: Collection of all the Sphere games I have
Reply #7 –
Here's an interesting breakage: Kamatsu's Supa Koopa Troopa. This one took me a while to figure out and I probably wouldn't have been able to without a debugger (because I don't say it enough, SSJ is the best thing ever
)
There's a map glitch in this game where the left half of the background is cut off, but that's just cosmetic. The actual breakage has to do with differences between the Duktape and SpiderMonkey JS engines. Specifically, Duktape doesn't keep track of source code for functions, causing this check in Kamatsu's class library to fail:
if ((ancestor instanceof Function) && (value instanceof Function) &&
ancestor.valueOf() != value.valueOf() && /\bbase\b/.test(value)) {
It checks whether the code for the class constructor contains the word "base" anywhere. If not, then it ends up extending Class directly rather than the specified class. Which causes the base class constructor not to be called and in turn, other weird untraceable bugs. There's literally no way for me to fix it unless Duktape adds function source code tracking. Thankfully, this kind of class library isn't needed nowadays anyway, since you can just use ES6 which has classes as part of the native syntax.