Chadori's Forum Posts

  • Hi, you can store the quotations "" in a local variable, this way the editor will allow it.

  • Happy New Year everyone!

    I assume everything is stable with the Mobile IronSource Collection's latest update now, so I will be requesting its whitelisting in the C3 Build Service very soon!

    As previously mentioned, the latest update is currently only available in the Cordova Project export option, due to the constraints with the C3 Build Service whitelisting process. This is to help lessen the Construct Team's work in reviewing the addons.

    Hopefully it's stable now, if you are still experiencing issues with the latest update in the Cordova Project export option, please report it here.

    Thank you for your time!

  • If it is a square or rectangle, you can use the Bounded Drag and Drop behavior, click to download the addon.

  • Hi everyone, the Mobile IronSource Collection has been updated to the latest IronSource SDK, including all ad-mediation networks.

    It has been updated to fix some initialization bugs on some specific devices. However, this update is only available in the Cordova Export option, temporarily.

    The C3 Build Service option is not available yet, due to the constraints with the C3 Build Service whitelisting policy. It takes at least 20 days until it all gets whitelisted, and we have 18 plugins for the Mobile IronSource collection alone.

    Therefore, we have to be sure it is stable enough before we request for whitelisting, to lessen the Construct Team's work in whitelisting plugins.

    Let me know if there are issues, and I'll work on it as soon as possible. Please report it in Tracking (Recommended), Discord or Email Support.

    If everything looks good after a few days or weeks, I'll request the addons for whitelisting.

    Thank you!

  • There is a patched version of the User Data addon. Please visit the #next-release channel, in the Discord Community, to receive the fix until the next patch is released.

    Thank you.

  • Release 11.0 : Major Stable Update

    Hi everyone, Release 11.0 is now out. It's a big important update that resolves a lot of new issues and also brings a lot of new features, please do update to this new stable version!

    Website

    constructcollection.com

    Discord Community

    discordapp.com/invite/eS3HK88

    That's all for now, thank you!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hi everyone,

    All addons are now rewritten for worker mode and modules, along with new features, sdk updates and bug fixes. A new version should be out in a few hours.

  • That's great! Thank you for the new additions.

  • By far the easiest solution is to load the SDK on the runtime side (i.e. in the web worker). If all the SDK does is use fetch/XHR/WebSockets etc., there's no reason it can't run in a worker: all those features are available in workers too. It may be that the SDK only needs a few minor changes, such as replacing window with self or globalThis, and then it may just work. You should ask the Photon developers about it.

    I followed your advice, and it seems to be the most practical solution. Thank you!

  • Thank you for your advice.

    However, this was actually a different matter, this is regarding Cordova plugins. It looks like the easiest way to handle traditional callbacks, in my opinion after porting a few addons.

    This is my sample:

    this.AddDOMMessageHandlers([
    	["on-mobile-sdk", e => this._OnMobileSDK(e)]
    ]);
    this.AddRuntimeMessageHandlers([
    	["StartSDK", e=> this._StartSDK(e)],
    	["Initialize", e => this._Initialize(e)]
    ]);
    

    Then,

    // Dom-Side.js
    _StartSDK()
    {
    	if (this._isMobile)
    	{
    		this._SDK = window["plugins"]["sdk"];
    		this.PostToRuntime("on-mobile-sdk", {});
    	}
    	else
    	{
    		console.warn("[Mobile SDK] You need to export to mobile in order to run.");
    	}
    }
    
    // Instance.js
    _OnMobileSDK()
    {
     this._isMobile = true;
    }
    

    This is more effective as you add more methods, the ones above are for the purpose of visualization.

    I was wondering if these are valid official SDK methods or should I rewrite it to what's supported. If it's not supported, could you kindly give me a quick reference to the methods I should use instead?

    Thank you.

  • You have to design around it. For example instead of directly accessing the "Is connected" state, post messages when the state changes to update a boolean on the runtime side, which can be accessed synchronously. This can end up being very complicated for more advanced state, and especially so when there is a real-time aspect.

    Thank you for the suggestion, I have already implemented it like that on simple SDKs like PlayFab. It updates the properties of the instance.js side whenever there are changes with the properties used by the method from the domside.js. Therefore, allowing me to recreate the SDK's synchronous methods in the instance.js.

    However, my issue is from convoluted SDKs like Photon's where its properties are updated from multiple branching sources. Which I agree what you've said, it is very complicated for more advanced state, which is why I'm asking for advice on how I can solve it in this advanced case. Thank you.

  • Here is the Photon JS SDK for context, in case you are curious.

  • Hi Ashley,

    There seem to be some SDKs that do not support worker threads, like Photon Cloud's SDK.

    Here are some sample methods:

    SDK.prototype.isConnected
    SDK.prototype.isInLobby
    SDK.prototype.isJoinedToRoom
    SDK.prototype.isConnectedToGame
    SDK.prototype.availableRooms
    

    These methods are in their SDK.js. The SDK.js is loaded through an external-dom-script dependency. However, there are methods that do not have anything to do with the DOM, which have properties that are only compared or parsed, hence synchronous.

    The issue is that I don't know a way for the domSide.js and instance.js to communicate synchronously. For instance, a condition called Is Connected or an expression called AvailableRooms().

    I could call PostToRuntime() every time the properties inside a method changes and recreate the methods inside the instance.js. However, most of the methods in the SDK are convolutedly hardcoded, there are no specific target where changes can be listened to, it would need an entire rewrite of the SDK, and that's not practical since the SDK will always be rewritten for every new version.

    I managed to workaround some simple SDKs like PlayFab. Although, SDKs or libraries like Photon can't seem to support it.

    Kindly advise. Thank you.

    Tagged:

  • Also, could you confirm if we can use these methods as well?

    this.AddDOMMessageHandlers([[handler, e => callback(e)]]);
    this.AddRuntimeMessageHandlers([[handler, e => callback(e)]]);
    

    Thank you.

  • Hi Ashley,

    Is the PostToRuntime(handler, data) an official SDK method, I can't seem to find it in the SDK and it is the method that best suits my addons. I can only find PostToRuntimeAsync being mentioned. Can you confirm?

    Thank you.

    Tagged: