Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

Plugin doesn't work in browser, any ideas?

I am testing this plugin:

https://github.com/KageDesu/Alpha-ABS

I cannot get it to work from a browser - error: "SDK is not defined".

The JS file is here:

https://github.com/KageDesu/Alpha-ABS/b ... pha_ABS.js

I don't know enough about JS to try and debug it; SDK seems to be defined at line 1901:

var SDK = PLATFORM.SDK;


It works fine from playtest from within RPG Maker MV. I don't know why it wouldn't work from a browser. Doesn't work from playing locally or uploading it and playing online.

Any ideas?
 
Solution
Line 9376 : Uncaught SyntaxError: 'super' keyword unexpected here

It looks like this Plugin was written with ES6, which is a bitch when it comes to browser compatibility, but works just fine in the offline client. This is exactly, exactly why I don't think Plugin authors should use ES6.

Also, it looks like you're using an older version of this Plugin? In the Github it is "Version 1.1 (21.10.2016)", but yours is "Version 1. (6.09.2016)".

In your version, Spriteset_InterfaceABS calls update() which uses the super keyword (presumable to call the update for Sprite). You can try replacing that call with "Sprite.prototype.update.Call(this);", but I suggest you update to the Plugin's latest version.

I tried your version in...
If you could post a web link to a demo that would be excellent.

In Google Chrome you can do Ctrl Shift I to bring up the same developer console that MV's offline client has (F8).

If you check the console it should tell you some details about line numbers. If you check sources you can find your Plugin and set a break point at the var SDK = PLATFORM.SDK; to check if and when that gets activated.
 
Line 9376 : Uncaught SyntaxError: 'super' keyword unexpected here

It looks like this Plugin was written with ES6, which is a bitch when it comes to browser compatibility, but works just fine in the offline client. This is exactly, exactly why I don't think Plugin authors should use ES6.

Also, it looks like you're using an older version of this Plugin? In the Github it is "Version 1.1 (21.10.2016)", but yours is "Version 1. (6.09.2016)".

In your version, Spriteset_InterfaceABS calls update() which uses the super keyword (presumable to call the update for Sprite). You can try replacing that call with "Sprite.prototype.update.Call(this);", but I suggest you update to the Plugin's latest version.

I tried your version in http://babeljs.io to convert it to ES5, it reported that the super keyword should not be there, so this isn't even valid ES6. Definitely try the latest version.

EDIT: But do keep in mind, ES6 support isn't all there and a lot of people use various versions of Microsoft browsers still, if you're going to use this Plugin I think you should compile it to ES5 with http://babeljs.io to gain as much compatibility as possible, at the expense of making your code incompatible with the original.

EDIT2: I think I see what's happened, you've copied the Plugin file from the demo project, which still uses the old version
 
Solution

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top