Mikal's Forum Posts

  • I also usually add extra instance related functions to instance.js.

    However, if you have a plugin which shares information / functionality between instances, I will also add properties and functions to type.js.

    I have also created separate '3rd party' files which contain classes that I use in a project (for example in the Spine project, I have a class that batches drawing all the instances. The class also contains a list of all instances.) If you do a 3rd party file post r226, watch out for the recent module globaThis/import/export changes.

  • This is also what I do for a high score leaderboard. One column/instance for name and one column/instance for score. It also allows for you to more easily do formatting like center or right / left justify per column as needed.

  • Thanks for the update!

  • piranha305

    One suggestion/request - update the c3IDE plugin code generation to include the new SDK boilerplate to handle the new C3 minimization (add the const C3 = self.C3; below in each JS file).

    "use strict";
    
    {
    	const C3 = self.C3;
    
    	const tempQuad = new C3.Quad();
    	
    	C3.Plugins.MyCompany_DrawingPlugin.Instance = class DrawingInstance extends C3.SDKWorldInstanceBase
    	{
    		constructor(inst, properties)
    

    Other newish example plugins here:

    construct.net/en/make-games/manuals/addon-sdk

    If you want me to enter this on the c3ide github instead as an issue, let me know. Thanks as always for this great tool.

  • I realized that if I go ahead and use module import/export, my addon will not be backward compatible to pre R226, so I'm going to continue to use the globalThis method for now, until the module mode goes into the stable branch.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Have you already tested using UserMedia and pasting to Drawing Canvas and then using the Drawing Canvas snapshot to check for the color/area?

    If you know Javascript, there is another method you could work with. Let me know if you know JS and if that would help.

  • Thanks for the tips Ashley, I am using some 3rd party external js in the Spine C3 addon (specifically the 'spine-ts' js library/distribution) and it does the 'sloppy' global declaration for the spine library. For now I changed the definition to globalThis.spine, instead of a top level 'spine' and it is now working again.

    I'll look to update this and the rest of the addon to 'modules' in the future.

  • On Animation Finished and On Any Animation Finished are working in my projects. Do you have a test project for me to review?

    If the test project is private, contact me on the Construct Community Discord and send it via DM.

  • For the bbox, you need the Spine Slot name and the Spine BBox name. Check in the spine editor or in the Spine JSON what the slot/bbox names are.

  • Some more work on Babylon 3D Model Sprite plugin, added default Animation Blending and isPlaying, onAnimimationFinished ACEs to handle transitions. Contact me on Construct Community Discord if you want to Alpha test (and have a 3D model to test with).

  • Nice work, nice to see these type of work w/o plugins (and just some effects). Keep up the good work, looking forward to the game when it releases, the demo looked good.

  • This looks similar to a 'smoothstep'

    en.wikipedia.org/wiki/Smoothstep

    Live example / formula:

    desmos.com/calculator/xykhidbkbg

    For your case you can do (1-(formula))*1000 to get your range and adjust a and b to match your limits.

  • I have seen converters/exporters sometimes fail to work perfectly between formats (and also have read about folks having troubles in general between many formats), in particular textures (there seem to be multiple different ways to handle 'materials' beyond just diffuse color between formats and tools.)

    If a glb works in the sandbox, it will very likely work using this plugin (since it's all based on Babylon and Babylon gtlf/glb loader.)

    In general performance could be relatively stable on desktop, but mobile tends to not handle dynamic texture updates from a canvas very well.

  • I see, my suggestion then would be to multiply everything by: PlatformInfo.DevicePixelRatio

  • There _may_ be a bug in the plugin (at least when run in preview).

    In c3runtime/instance.js:

    				self=this;
    

    This line might be overloading C3's use of 'self' at the top level (at least in preview.)

    After commenting out that line and disabling worker mode, the plugin no longer does a black screen (also a suggestion, if you see a black screen open up the browser developer console and check for errors, this is how I debugged and found the worker mode issue and the 'self' issue.)

    Also note that my experience is Corodova based plugins are not functional in C3 preview (since the cordova plugin may not be loaded in a preview environment.) They are functional when built for the target mobile platform (e.g. iOS or Android.)

    I would contact the original plugin author to see if they can help based on this info.