Testing plugins for various platforms/browsers

0 favourites
  • 3 posts
From the Asset Store
A pack of 76 platform designs for a platformer game with a mushroom/jungle theme
  • Does anyone know of any good reference website regarding issues/limitations with the various platforms/formats C2 can export to?

    In other words, how can one ensure a plugin created for C2 will work with the various export formats? I noticed looking at the standard C2 plugins that Scirra have had to create platform/browser specific code in many places. How does one know what issues may require such special treatment without having to test on all possible platform/browser combinations?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Well, in theory, Scirra has covered all that ground so that the rest of us don't have to. Their standard format for making plugins- unless you're trying to implement something that's just like, extremely unusual- is very simple and straightforward. So, you wouldn't have to test it under every possible circumstance for the same reasons you wouldn't have to test a new lightbulb in every commercially-available lamp. As long as you know that the lightbulb can physically function and you don't try to use it to paint your living room or something, you should be good to go.

    Essentially, all you're really doing in the add-on code is modifying a JavaScript object prototype, which is core to the language already and isn't a Scirra invention or anything. Just making functions and properties as needed, specifying whichever parameters the object will require, so on and so forth. Making the program good is the important concern; as far as I can tell, anywhere regular JavaScript code currently runs, the JSSDK plugins should also run (unless it's just a badly-written plugin on the developer's part, of course, but that's not a Construct issue).

    Anything they've had to do that's very platform-specific has likely been for the purpose of getting all the JavaScript functionality working as expected where it might not historically have been implemented. But assuming that's been completed successfully, there's not a whole lot of JS you could write that won't run on whatever platforms Construct will currently export to.

    The only exceptions to this that I can think of are very framework-dependent applications. But even then, all you'd have to do is include whatever script-files or libraries your thing depends on inside the project file... Or, in the case that someone is wanting to develop for a platform that isn't capable of running JS programs, it's a pretty safe bet that Construct is the wrong tool. Apparently there's also some minification issues, but that's not technically necessary, and although inconvenient, doesn't restrict what you can actually do.

  • emkolar Well I agree with your feedback in principle, but there are situations in which it is not true.

    For example, the first plugin I worked on, an audio plugin that allows to use audio streams instead of just audio files, works fine when you export to HTML, but one of its functions (stop the audio stream currently playing in this case) doesn't work when you export the game using NW.js (the stream will not stop playing). I must admit this was a first attempt at plugins and I haven't had time to revisit the code to check why this may be happening, but the simple fact that it works in some cases and not others shows there is some cross-platform variance.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)