Addon SDK v2

From the Asset Store
Data+ is the best Data Management solution for Construct 3. It contains 4 Addons (Plugin & Behavior).

    Other game engines also don't make you reinvent the wheel every time, they have standard libraries, and a set of extensible classes for you to build upon and use. This has not appeared to be the case. To make the simplest of add-ons your forced to implement all the logic when the engine already has that built it? This makes no sense. Construct has built in vectors, and a built in color class that handles all the math and conversion, yet if an addon needs these, your force to rewrite all that code? Engine are literally suppose to make making stuff easier. This deviates so much from that idea. I seriously keep asking my self why I keep using construct?

    I just updated 1 of my plugins to addon v2

    although it works fine but it's taking up a lot of my time.

    construct.net/en/forum/construct-3/plugin-sdk-10/free-addon-leaderboard-score-181551

    Ashley you're always talking about how Scirra is such a small team with limited resources to invest in new features, this is a reason for addons to exist: to EXTEND the functionality you can't get with the first party plugins and event sheets. What's the point of addons that literally do the same as event sheets?

    It's hypocritical to say you have limited resources and then invest them to LIMIT further the possible features the engine can have instead of ADDING new features.

    Also, if you're trying to compare Construct to other engines you're in a losing battle from the start. Other Engines not only are source-available but you EXTEND the literal classes, you have access to the physics engine, you have access to the drawing engine, you have a proper editor API to extend it. Construct lacks all of this.

    If you're 100% certain about going further with this move, that is awful in many ways, at least make it somewhat worth it:

    - Give access to the Phsyics engine.

    - Make the process of developing Addons less of a hassle, because contrary to what you've said NOTHING HAS CHANGED, you only removed features but the process is the same, take a look of what the community has achieved with C3IDE2.

    - Give access to a proper Editor API.

    If you don't want/can't do all of this, let the community do it with Addons.

    We will not drink the Kool-Aid. You're removing features by saying you added some, you're not Apple,you need to remember yourself that, yeah, you're just a small company... and we're the clients.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads

    as well as co-operating with addon developers to ensure the v2 SDK covers all features where reasonable and feasible

    This is key. Ashley Please prioritize the requests of the addon devs. Maybe allow them to have a sub-forum or a special flag/section in the github feature request repo.

    Instead of complaining, I would request the features I need to port my plugins, and see how helpful Scirra is going to be with that, if they are true to their word.

    Ashley As a user, addon devs were solving some major problems for us, which gave confidence for more users to rely on C3. Some of the -soon broken- plugins are already used by many users, so I would request prioritizing helping them. You can treat that as working on new features for the next couple releases?

    Maybe make a script that analyzes the listed addons and pinpoint the deprecated API calls in the code, then notify the owner. Make their lives easier. It would benefit everyone as much as (if not more than) adding new features to the engine.

    Addons are "already" in use, so helping them stay in use is as important as the backward compatibility you always talk about.

    In general, for game engine software, Unity, Unreal, Godot all have plans that allow for their internal engine source to be accessed

    The addon devs have done a tremendous job to keep C3 updated.

    If devs have full access to the source, I doubt anyone will pay Scirra anymore!

    If the api is hidden, no one will be able to make workarounds or custom features.

    I hope the sdk v2 is a step towards a middle ground.

    And to be honest, in the previous thread, some developers were willing to update their addons using unsupported apis, but now when v2 is released they are not willing to port their addons.

    This is the reality. No one has time for this sort of thing. So while the addon devs will invest a lot of time porting their addon, Scirra will keep them supported as part of the official api, so the devs won't have (hopefully) to maintain them as frequently as before.

    As a professional developer, some clients had old C3/2 games (maybe bought online) with long-gone addons and were asking me to spend unreasonable amount of time porting them or making similar functionality. I think sdk v2 is a step in the right direction, but it is not enough yet.

    I think there is a very simple solution that would solve everything :

    ✅ do Milestone 3 (showing a warning for addon made with SDK 1 in 6 months)

    ❌ but just don't do Milestone 4 (removing support/access to Addon SDK 1 on purpose, while it will always be there under the hood at it's litteraly the whole C3 runtime codebase every official Plugins/Behaviors/features rely on)

    This way Scirra could remove all references of Addon SDK 1 in the documentation and totally replace them by Addon SDK 2 Documentation.

    There would be a warning to tell all users using SDK 1 addons that they're risky because the runtime sourcecode could change and some things could break BY ACCIDENT (instead of hiding/breaking/removing access to everything on purpose).

    => It totally solves the problem Scirra is raising

    However any poweruser, any commercial/ambitious production would still be able to use powerful addons, extend the engine and implement features by themself at their own risk if they need it (as almost any full game ever made in C3 that use a few addons using at least a few undocumented features, and as 99% of any commercial games made with any game engine out there)

    SDK 1 will always exist under the hood, SDK 2 is just scripting interfaces calling methods from SDK 1, so there is no valid reason to 100% remove the access to us if any addon using it shows a clear warning that some stuff can break inadvertently due to C3 updates.

    What's the point of addons that literally do the same as event sheets?

    I partially agree with this. The reality is there are things that are really annoying to do in eventsheets. Or that are complicated to a degree (especially for newer users) that abstracting it behind an addon is really helpful. Simplest example: The platformer behavior. You can code this entirely in events if you want. But it's also surprisingly complicated and it's really convenient to just use the behavior. As a tradeoff, you don't have 100% control over the code (which has been requested and denied frequently)

    Overboys suggestion is actually really good but at the same time I guess defeats the point of all this... which is to remove access to engine internals, period.

    It's the old "powerusers vs little Timmy" discussion again. Powerusers want to have full control and power, but little Timmy can't handle that power and might break his project and throw a tantrum, so powerusers will be put on a leash.

    It will probably show with time, how well this works out. Perhaps, maybe, it turns out better than we all expect (or I'm just huffing copium)

    Simplest example: The platformer behavior. You can code this entirely in events if you want. But it's also surprisingly complicated and it's really convenient to just use the behavior

    To this point, code reuse in construct is not friendly towards add on devs, let's say you build a system around ledge grabbing in events. Let's say you want to use this system in multiple projects. Oh just turn it into an add on, oh wait there is no way to extend the current platform behavior with out completely rewriting the whole behavior. (which imo becomes an even bigger compatability nightmare)

    This is not the case in other software? Not just game dev? And the philosophy of this new sdk I think is very detrimental to construct.

    Even then, the more I think about it the more I realise that the way addon SDK v2 is designed right now can only lead to more issues, or less addons.

    In the future, when addon devs will inevitably reach the same problems we've faced with v1 (aka feature exists in C3 but is undocumented because arbitrary reasons, and Scirra doesn't want to add it because of other constraints) we will be left with only radical options.

    For example, I recently made a SetFOV addon that contains essentially 4 lines of code. These same 4 lines of code are now in C3, but at the time the only way to do that would have been to access runtime internals.

    For such an addon, the new way to do it according to the ideal design is to write my own camera system. However, the camera system in C3 is deeply tied to the layout system and the canvas renderer. So I need to rewrite those as well.

    So now, to be able to change the FOV of my game I am left with 3 options:

    - Beg scirra to add it

    - Do even more aggressive engine hacks

    - Write my own renderer

    None of these options are good. None of these options are workable.

    Let's take another example:

    In my addon Reset Variable, I access the class that manages the variables inside of C3's event sheet system. All variables (global, local, static) have an internal "reset value" function, but C3 only exposes an action to reset ALL global variables.

    There is no way to reset ONE variable, and there is no way to reset local variables (static or not). Which means the engine has a feature that exists, works and is just there, but does not use it at all, and does not want me to use it.

    With V2, I am left with the following choices:

    - replace the event variable class with my own class that gives me access, which is a BIG engine hack

    - write my own system that, every tick, tracks the value of event variables, stores initial states, and lets me set their values to the stored initial state. This would create a lot of issues related to state sync, because there is no way to be 100% sure the value I am currently holding is correct.

    - write my own variable system that is completely decorrelated from every other feature in C3.

    Again, none of these options are good, which means the only solution is to not make that addon.

    Now you might think "oh well its fairly easy to do this with events, just use another variable" however if you're doing this on a project with several hundreds of variables, there is no way in hell this will actually be feasible. And it's especially a bad idea knowing the feature is already there and works perfectly fine.

    One last example:

    In my addon LocalStorage Snapshot I am trying to solve an issue where a game has every system deeply integrated with LocalStorage and now needs to save and load everything to and from a file instead.

    What this addon does is use the undocumented features C3 has to get all the data currently saved to C3's localStorage system, package it all in a JSON string, and allows me to load that JSON string back into the system.

    The only way to do this with V2 would be to copy paste C3's localstorage system on both worker and domside and mess with the final indexedDB it saves to and pulls from, which might create conflicts. Also, if at any point in the future, C3's localstorage system changes, my addon explodes and creates issues whereas the first implementation has good chances to keep working, and even if it fails, it's very likely it's just a matter of changing what functions to call which is far easier to maintain that to rewrite the entire thing.

    These addons have all been made and published to solve very real problems people I've helped have encountered. The solutions are far from ideal, sure, but with addon SDK v2, the alternatives become far worse, and IMO, would lead to way bigger issues down the line.

    It reminds me of how back in the Construct 2 days people would copy paste addons, change 5 lines of code and republish them as "Text+" and that lead to issues whenever the main Text object would get a new feature because we'd now have 2 separate codebases to maintain.

    In Construct 3, this issue was largely avoided because the engine internals made it easy to do these simple changes while keeping the main code base the same, and while keeping the risks of failure relatively low. Losing access to this means the only alternative will be to go back to how things were done in C2 aka copy chunks of the engine into your addon just to be able to access one feature, or change one value.

    Folks, please remember the goal here is to stop a regular occurence of customer projects being ruined by permanently broken and unmaintained addons. I don't think addon developers always see the consequence of this, so perhaps it is harder to understand. But from time to time we get desperate emails from customers who have projects they've been working on for years begging us for help, when the problem is they use some addon that is now permanently broken. Unfortunately we usually cannot help them, and it really pains me to see that happening to customers. This has happened a bunch of times in the past, it's happened recently, and it's going to continue happening. I genuinely fear that a few years from now there will be some huge compatibility disaster and thousands of projects are permanently broken, or we have to retract some major improvement and cancel plans for further improvements - a catastrophe either way. If that did happen I'm sure everyone would be saying how our top priority is to better design our software to prevent that happening. I think the main reason we have avoided that so far is luck, and I don't expect our luck to last forever. We're trying to solve this problem before such a disaster happens, and to stop the regular occurence of ruined projects.

    The addon SDK v2 solves this by using proper encapsulation. That's the industry standard approach. Literally all other software already uses that approach. Nobody allows unfettered access to engine internals through installable addons, because everyone in the industry knows that's a disaster waiting to happen. Access to source code is different to this: we are talking about the long-term compatibility of installable addons written by third-party developers, not just whether you can download the entire engine source code.

    I am largely just re-stating the same case here, and I don't really want to have to keep re-stating it over and over. I am fully aware of the extent of disruption and extra work this is going to cause. This is regrettable. However consider that we are not doing this for fun. We could just carry on as we were before - but in my professional opinion the problem is so serious that it does warrant this disruption. We have a responsibility to take tough decisions to do the right thing for the product and for customers.

    For post length reasons I'll try and answer a few other questions here:

    Will Scirra provide assistance to help with porting from V1 to V2, besides the very simple SDK examples?

    There will definitely be a "porting v1 addons to v2" guide in the documentation. I've also already created commits on the GitHub repository showing diffs so you can see what was changed to go from v1 to v2.

    Is there a possibility to make a 'wrapper' around V2 SDK to support previous V1 SDK addons or at least for the vast majority of the V1 SDK?

    For simpler addons, porting mainly involves renaming things (e.g. see here). Perhaps some tool could be made to convert the basic template, but I think the APIs are too different to allow for full automatic conversion of arbitrary code.

    My hope is that is because the scripting interfaces for addons will be 'automatically' generated somehow.

    The addon SDK v2 classes are the script interfaces (they actually derive from the script interface classes), so there is no extra work to add a script interface.

    Construct has built in vectors, and a built in color class that handles all the math and conversion, yet if an addon needs these, your force to rewrite all that code?

    Anything we expose to addon developers must be supported permanently and with backwards compatibility, otherwise we end up with the same problem of customer projects being ruined. So we can't say 'here, have access to this library of vector/math/utility code' - we have to design a public API that will be supported forever. That's a lot of work and a significant long-term maintenance consideration, and can take away our flexibility to do something like an engine optimization by changing the library code. Instead the approach we have taken with the script APIs is to use the browser built-in features such as DOMRect instead of a custom rectangle class. Want more? Import a JavaScript library. Problem solved, and no risk of compatibility disaster.

    The solutions are far from ideal, sure, but with addon SDK v2, the alternatives become far worse, and IMO, would lead to way bigger issues down the line.

    The downside of accessing engine internals is ruining customer's projects. This can be so bad, in the long run it is in my view significantly worse than any of the other options. I guess you haven't had to deal with desperate customers begging you to fix their ruined project and been unable to help? We definitely have. In my professional opinion: literally any other solution is better than modifying the engine internals. Hacking the engine internals carries such a severe risk of disaster that it must be ruled out, which is why the software industry invented encapsulation and has been using it widely for decades. In other tools with a proper API with encapsulation, people get by with workarounds or alternatives, and while that may be painful and difficult sometimes, it's a better option.

    Part of this project is over the next year or so to make sure the v2 addon SDK has sufficient APIs that it can cover necessary features, or just add new built-in features instead so there doesn't need to be an addon. We do want to minimize the disruption and make sure there is as smooth a transition as can be achieved. However, please, please don't try to bypass the encapsulation, or start copy-pasting chunks of the engine. Please, please, please please please please don't do that. I pretty much have trauma from how utterly awful the consequences of that were with C2. It is just a total, epic disaster, for us and our customers. Please please please please please don't do that. And it is the risk of that kind of epic disaster we are trying to put an end to with the addon SDK v2.

    From experience I know I can't make a platform like behavior with events. Events are too slow for everything. I know I can't make a Vampire Survivors facsimile with physics. Physics is too slow.

    If Scirra get support scares like that, we see it with bug reports where Scirra are unable to assist and must say "it's a chrome issue" or "report this to apple".

    Can't the same be said for support queries about broken projects with addons? "you'll need to speak to the addon dev, Scirra cannot assist I'm afraid". I mean, even if V2 is implemented, I'm sure Scirra still would reject a support email since it has 3rd party addons, right? (or ask them to remove them then send back to Scirra).

    If a chrome issue broke C3 for a user, some users may still be mad at Scirra, but ofcourse Scirra can't worry about that, it's a chrome issue, Google's issue!

    This could be same for addons? Not Scirra's problem, just the addon devs issue.

    Not to mention there's a much higher chance to get a response from an addon dev, compared to hearing back from Google or Apple.

    I guess you haven't had to deal with desperate customers begging you to fix their ruined project and been unable to help?

    I've been doing consulting work on Construct project for many many years. Dealing with panicked developers begging me to help them fix an issue that might kill their games is a thing I do fairly often.

    Also, as a 3rd party addon developer, this is also a thing I do, and I've had to deal with it most of the time for free and on my free time.

    Please, please, please please please please don't do that.

    Please understand I am not saying that to make you panick, I am just trying to explain that things often take the path of least resistance, and with the way v2 is currently designed, I believe that this is a possible outcome that might happen.

    Again, I will always do my best to cooperate, but I cannot tell you with a straight face that no other dev will ever attempt this.

    The downside of accessing engine internals is ruining customer's projects.

    Also, please take into consideration that often not doing these changes might also mean the end of the project as well. If the "good" alternative means rewriting large chunks of a game's system which might take months, then it's just not going to happen. These developers are always on tight deadlines, and often with publishers looming, or with player sentiment dwindling, which means that it's often perceived as just as bad.

    Also, most of the issues regarding possible long term failure in the long run can be addressed simply by asking the developer to stick to a single Construct 3 version. This is also why I've requested multiple times in the past to let addons access the current version number to be able to properly gate against long term failure.

    what if addons were versioned with a specific editor version. this would guarantee that addons don't break project's on a particular version of the engine. and just prohibit addons from being installed on new version?

    enforce addon devs to signoff on the version to keep parity with the engine? packages in other software follow this principle. where libraries and packages only support a set of versions of the tool.

    If I am creating software and decided to use x library. and then mid-project I need to upgrade my tool. and the library is not compatible with the tool (yet, or maybe never). there is a tradeoff of I need to find a new solution or not upgrade until the next project? i don't to go to like Microsoft and say hey this library on github does not work with dotnet 8, fix it? thats not how stuff works

    You forgot to answer one big point, why isn't the warning for addons made with SDK 1 enough ?

    • You could even put a link to a detailed documentation page explaining the risk in the warning.
    • You could also totally prevent Education licence to use those
    • It could just be available to users who enable the hidden developer mode.

    This way only ambitious/professional production would use it when they need it (because they actually need it)

    There is no reason to just destroy/hide/lock everything for everyone.

    Also you keep saying your only goal is to avoid a compatibility disaster and avoid dealing with disappointed customers.

    But soon, every addon and every game using at least one of them will break, EVERY addon will need to be rewritten from scratch and some of them (I would even say most of best addons) won't be portable at all. All of this by purpose and for no gain for any C3 user, so there will be actual reasons to be mad at Scirra + it will put more pressure on Scirra to implement every specific features any production needs while Addon Dev are currently doing it easily

    Imagine if Unity did what you're trying to do : breaking all 3rd party stuff and enforcing everyone to use vanilla features only, the drama and exodus would have been 10x worse than the Runtime fee disaster.

    It's as if Unity announced the whole Asset Store + any private tools made by game studios/companies are obsolete, and 80% of the best ones would be totally impossible to remake in the future, because the engine is about to be 10x more restricted and limited.

    You're doing the opposite of the goal you're explaining to us. You're creating the problem and saying at the same time it's the solution. It makes no sense

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