mOOnpunk's Forum Posts

  • Can you describe what you are wanting to do, as i'm not sure what you mean exactly.

    Do you mean like paste a sprite into the polygon shape?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • New update.

    1. Added a Scale shape action under the maths category. It scales the shape while points can still be edited as normal.

    2. Found a bug with smoothing where the first point was not being smoothed. Added a new parameter for if the shape is closed, or open like a line, so it smooths correctly.

    3. Most actions and expressions now except both string and numbers.

  • New update available. Segments were not being rendered when a shape was cut. It turns out there were bigger issues with point handling effecting other areas of the plugin.

    Sorry if you tried the plugin and it was not working correctly. Should be good now.

  • Wow great example R0J0hound

    Thanks for the feedback.

    I will look at adding shape scaling, and having PointWorld accept numbers as well.

    Boolean operations like cut and merge are done by the clipper.js lib, so i will have to see if it can cut shapes into one, or look at other options.

    EDIT - Actually you can already do the square with the triangle shape donut by doing 2 cuts, first the triangle, then a 1 px line through the side. This will then rebuild it as 1 concave shape.

  • Thanks.

    I'm looking at integrating LiquidFun.js, since i've done all the hard work, and adding hard bodies, soft bodies, water and soup.

    Not sure if its possible yet.

  • I released a new plugin.

    construct.net/en/make-games/addons/1644/polygon

    The Polygon plugin allows you to easily create polygon shapes and perform Boolean cuts, holes, merges, apply clipping masks and images.

    Its easier than css and works on the construct canvas like a sprite, and better than the drawing canvas.

    I was hoping this plugin could be used with physics, it can but it can only use the bounding box. This is because the SDK v2 doesn't allow collision points to be set.

    Any bugs or feature request let me know.

  • Its a custom shape plugin. I cant access the image editor to edit the collision points. I need to be able to tell construct where the collision points are so i dont have to rely on bounding box, which creates invisible padding around none square shapes, making shapes appear to float when using physics.

  • These seem to be just getting their positions?

    How do we modify them like

    addPolyPoint

    removePolyPoint

    setPolyPointX

    setPolyPointY

  • Ashley

    Could you add methods in the sdk to add and edit collision points?

    I'm finishing work on a polygon object, it would be nice to be able to use with physics but it can only use bounding box at the moment.

    construct.net/en/make-games/manuals/construct-3/scripting/scripting-reference/plugin-interfaces/sprite

    Thanks.

  • That's cool, but the mask is not transparent. When the image doesn't cover the mask fully you can see its colour.

  • Updated to fix a load and save bug.

  • Easily create invisible masks to clip sprites, 9 patch, text and other common objects.

    The plugin uses blend modes to mask objects.

    It automatically creates the sublayers at runtime, and sets up force own textures, moves objects to the correct layer and z order.

    It sets blend modes depending on if you want the clipping inside the mask, or outside the mask.

    It allow multiple masks on the same layer.

    Super simple to use. Just add the sprite or 9 patch to a layer, set it as a mask, then set other sprites, 9 patch or text to be clipped. That's it!

    	+ System: On start of layout
    // first place the easyMask object on the layer you wish to be the mask layer. It must be a new transparent layer.
    
    The plugin will then generate sublayers on that layer at runtime. These are the mask layers. The plugin automatically sets up blend modes etc for you.
    ----+ (no conditions)
    ----// make the mask object. This can be a sprite or 9 slice. The object is then moved to the new correct sub layer for you.
    -----> easyMask: Set mask shape to maskShape
    ----// now select a shape you want to be masked.
    -----> easyMask: Mask objects Sprite
    ----// decide what mask you want. does the shape want to be clipped inside the mask shape or out side?
    -----> easyMask: Set mask mode to Hole Punch (Erase inside)
    
    
  • Thanks R0J0hound

    It would be nice to have less of a hacky way to do this, but i was able to do what you said and put it in a plugin that handles it all for you automatically. Adding some more features then will release it.

  • There is no blend mode combination you can have that clips sprite A to sprite B's shape while leaving sprite B invisible.

    The closest is apply source-in to sprite A, and having a transparent edge on the image, but it needs to be larger than sprite B to hide sprite B's the shape.

  • Sorry, i was under the impression that it was possible in v1.

    Is it possible to add an official supported method in V2?

    So we can do proper masking and clipping of sprites and other objects etc.