Mikal's Forum Posts

  • Blackhornet, if you are interested, we can discuss C3/WebGL over on the Construct Community Discord (R0J0hound gave me some great tips based on their C2 work.)

  • Here's a JS line clipping library in case you want to do the clipping yourself:

    github.com/mapbox/lineclip

  • In my experience, C3 renderer drawing lines or drawing quads will draw anywhere on the viewport/screen regardless of the worldinfo bounding box.

    If you want to clip to the size of particular bounding box, you might trying to clip the line yourself (e.g. find the line intersection(s) of the bounding box and draw the line with the new coordinates.) Using GetBoundingQuad() to get the coordinates to clip against.

    In the current public plugin SDK I have not yet seen a way to draw into another C3 texture (though I imagine this is what the Drawing Canvas does.)

    Perhaps you could try extending the Drawing Canvas plugin class and add the features you want to it? Or add a behavior to a Drawing plugin object which could do something similar?

  • You are welcome, if you are using it please post screenshots, I am always interested to see it in action.

    Release 1.14.0 Added C3 web worker support.

    Release 1.14.1 Fix PMA bug regression (introduced in 1.11.0)

    Thanks to Erikari over at Esoteric for noticing the PMA issue.

    I added Web Worker support for spine-ts in the SharedAssetManager class, which is used in the Construct 3 Spine plugin. This enables us to use spine-ts and the Spine addon with Construct 3 in Web Worker mode (which can reduce FPS jank in a web browser, decoupling from the main browser thread.)

    The main changes for web worker: use fetch() instead of img.src (loading a HTMLImageElement), use ImageBitMap instead of HTMLImageElement, enable OffscreenCanvas instead of HTMLCanvasElement.

    Construct 3 web worker description here:

    construct.net/en/blogs/ashleys-blog-2/performance-isolation-html5-1512

  • Added runtime custom skin support per instance (Create custom skin, Add to custom skin, Set custom skin). Can have multiple runtime created custom skins per instance.

    Release 1.13.0

  • A number of new updates. The batch render improves desktop performance of multiple instances by roughly 4X on my example system. The support for multiple atlas pages allows for multiple pngs to be loaded for a single skeleton (this can help with multiple skins with different textures per skin or attachment.)

    • 09/11/2020 1.12.1 Change to comma separated instead of space separated for png paths.
    • 09/10/2020 1.12.0 Add support for Atlas pages (multiple png, comma separated), finish implementation of Set Attachment action, fix webgl1 support (revealed on iOS w/o weblg2 enabled.)
    • 09/05/2020 1.11.2 Move spineBatcher.init() to prevent race condition (seen on iOS)
    • 09/05/2020 1.11.1 Remove spine instance from batcher when C3 Spine instance calls Release() (e.g. C3 object destroyed.)
    • 09/05/2020 1.11.0 Implement batch render for improved performance with multiple Spine objects and instances.
    • 08/16/2020 1.10.0: Add Keep Aspect Ratio checkbox
  • Nice work, thanks for sharing!

  • One more firebase addon to check out (I have not tried it myself, but looks interesting):

    sparsha-dhar.itch.io/construct-3-firebase-plugin

  • Example from your project:

    	function resizeImage(runtime, bURL) {
    
    	// runtime.objects.BinaryData.getFirstInstance().getArrayBufferCopy()
    	// has the image data in it, but how do we get it into an img.src or ImageData variable?
    	let img = document.createElement("img");
    	img.src = bURL;
    	ctx.drawImage(img, 0, 0);
    	HERMITE.resample(canvas, 450, 300, true);
    	console.log('[resizeImage] resample complete')
    }

    I imagine you want to do something w/ the canvas image to C3 after that...

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • How about:

    	let img = document.createElement("img");
    	img.src = BinaryDataObjectURL;
    

    You can get the BinaryDataObjectURL from the C3 expression: BinaryData.GetURL and pass it into scripts via localVars.* or runtime.globalVars.*

  • The Greengrinds addon (extended Steam/Greenworks support) has been updated to support nw.js 0.47.0 and SDK 1.49, based on the prebuilds from Armaldio's nice work (https://greenworks-prebuilds.armaldio.xyz/)

    I also added a new expression to support IPCountry.

    Details here:

    construct.net/en/make-games/addons/244/greengrinds

  • C3 Project for the above example: gofile.io/d/POMLlT

  • More experiments with the latest release, created a recursive walk hierarchy function to color parent and children recursively down (could also make an up and down version.) Seems to work reasonably well. I am wondering if there would be an ACE shortcut (e.g. pick recursively down from an instance, similar to how destroy already works?)

  • Ah, I don't think this png will work as a C3 SpriteFont source as is. Each character needs to be in it's own cell with a fixed cell size (e.g. 16x16), it should be left aligned (e.g. character should be set to start on the left side.) In your example, each character has a variable cell size (width varies.)

    If the characters have a fixed cell size and are left aligned, the spacing data can be used to place the characters with the appropriate 'width' between each other, so it won't be monospaced.

    Here's Good Neighbors:

    Here's the correct style of formatting (notice the 'I'):

    You can fix it though, edit the image so each character is in a fixed sized cell, left align the character and then use spacing info to make the spacing correct.

  • The quick answer is that it looks possible, but it will take some work to understand the SDK, create C3 functions / JS scripts in C3 to work with it.

    Review this tutorial which shows an example of using C3 JS to integrate the Playfab JS SDK from blackhornet. It could spark ideas about how integrate the Player.io SDK into C3 with JS.

    Part 1

    construct.net/en/tutorials/add-playfab-cloud-storage-2479

    Part 2

    construct.net/en/tutorials/add-playfab-cloud-storage-2482