[Beta3] Sphax VectorialShape

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hello everybody ! Since the new features available and futures ones, I've renamed the object (VectorialCurve) to VectorialShape. :)

    A lot of new features are now available ! :D

    Bugs corrected :
    - Possible crash with SetFirstPointPosition and SetLastPointPosition.

    Changes :
    - All presets in the menu have been renamed
    - Preset "link" has been renamed to "Link auto"
    - Menus reorganizations
    - Action "Set point position" : now you can enter a negative ID to add point(s) at the start like you can do with positive values greatest than the total number of points. ;)

    New features :
    - New preset : Link horizontal
    - New preset : Link vertical
    - New preset : Circle
    - New preset : Ellipse 1 point (center)
    - New preset : Ellipse 2 points (top left+bottom right)
    - New preset : Regular poly
    - New expression : get Nearest Point ID from coordinates
    - New action : Insert a point before another
    - New action : Delete X last points
    - New action : Delete X first points
    - New action : Set number of points
    - New action : Set collision on/off (to disable fine collision detection)
    - New expression : Get fill mode
    - New expression : Get fill color (by color number 1-based)
    - New expression : Get fill alpha (by color number 1-based)
    - Support of solid fill
    - Support of motif fill
    - Support of linear gradient fill

    Optimizations :
    - none

    Examples :
    - Updated example with main presets
    - New example : Basic Solar system
    - New example : Draw
    - New example : Vectorial selection (it's a little game where you should enclose a maximum of same fishes to have points)

    Known bugs :
    - Some glitches are drawn with very small angles and an outline thickness greater than 1
    - Some glitches appear when the rotation of the linear gradient is at 360° (don't know if I can do anything against that)
    - MMF2 Crash if a function with parameters is called after the object has been destroyed. It's an MMF2 bug.

    In the future :
    - Support the texture fill
    - Support the shape fill
    - Maybe support the points color for shape fill mode
    - New action : Set point position to an object
    - Filled options if closed state ON
    - Your ideas...

  • I like the new features. So many to explore.

    Fill was unexpected at this stage. I have some comments about it:

    Fifty-two motif modes is wonderful. That provides all kinds of useful patterns for filling-in. However, I think I would call that "pattern" instead of "motif". That's just a preference and a fill pattern is more in line with what I understand, though "motif" fits as well.

    I noted that, when I move a filled object, the pattern does not "snap" to the object. What I mean is, the pattern appears to be on the background and static as the object moves around as if over it. While that might be useful in some cases, what I call "snap to" would be the more usual case.

    I made a circle and filled it and that was the effect I got when moving it around. Is there any way to set that currently?

    This object is truly evolving quickly and turning into a more amazing tool with each Beta.

  • I am a little confused about the gradient fills.

    It seems if I don't set values for "Set linear fill" there is no gradient shown. Shouldn't that have a default setting to fill any shape?

    Also, I am not quite clear about how setting the linear fill affects the gradient. What are we setting and how does that relate to the shape itself? I can understand that there would be a crossing point for the gradient.

    Maybe a little gradient fill example that illustrates the use would be a good idea? I think that would make it easier to work with.

    I have not tried it yet, but since you set colors by number, can you have gradients with more than two colors?

  • I would like an expression to get current hatch/motif/pattern style. Again, pattern sounds better to me.

    I am also wondering, no big deal, if the hatch numbers should be modded to role around infinitely back to zero and up again? Would that be useful for users that want to cycle through them? O-56 = 57-113, etc.

  • Concerning the size of a circle:

    Since Ray is the diameter of the circle from the x and y points, I would like to be able to get current Ray so that I can add and subtract an amount to resize the circle. The same would apply to the ellipse, (RayX and RayY).

    Or is there another way to do that? It seems to make sense to use Ray as your reference in this case.

  • Regarding mouse events and bounding box:

    When I use mouse is over and mouse clicks on circles and ellipses, the empty area in object's bounding box, (actually it seems even larger than what should be the bounding box) triggers the event rather than just the shape's inner area itself.

    Is there a way to change or fix that?

  • Heheh! I was looking for barycenter and I see you replaced the term with origin. I think that is a better term to use for regular users.

    However, under Transformations you have Position (from barycenter) and so, to be consistent, that might be better as: Position (from origin), ey?

  • Question:

    On that last example, what is the best and easiest way to rotate that polygon on its own center? There are many actions with this extension and I see that my polygon is being drawn offset from the AO that I am using as a point.

    So, I just want to spin that polygon, not rotate it around something else ;)

  • I think I would call that "pattern" instead of "motif".
    [color:#3366FF]> I'll rename motif and hatch to "pattern".[/color]

    when I move a filled object, the pattern does not "snap" to the object
    [color:#3366FF]> Yes I know. ;) Only the linear gradient snaps to the shape. It will be done in the future for all fill mode. Actually you have an option to set the transformation mode. This mode set the snap or not for the fill (but only works for linear gradient actually). :)[/color]

    It seems if I don't set values for "Set linear fill" there is no gradient shown
    [color:#3366FF]> By default the linear gradient is done from 0x0 to 0x0, so there is no gradient. I'll not change it I think.[/color]

    Also, I am not quite clear about how setting the linear fill affects the gradient. What are we setting and how does that relate to the shape itself?
    [color:#3366FF]> You must set to points for the linear fill. Then the gradient is done from the first point with 1st color to the second point with second color.[/color]

    I have not tried it yet, but since you set colors by number, can you have gradients with more than two colors?
    [color:#3366FF]> It's planned. :)[/color]

    Can we set the size of the "motif" hatch patterns, or do we just rely on the presets alone?
    [color:#3366FF]> I don't know actually if I can resize the motifs... Maybe yes, maybe not... I'll see what transformations can do to the fills. It will come at the same time with snap feature.[/color]

    I would like an expression to get current hatch/motif/pattern style. Again, pattern sounds better to me.
    [color:#3366FF]> A lot of expressions will be added in the next release.[/color]

    The hatch numbers should be modded
    [color:#3366FF]> It's a good idea but actually you can mod it yourself. :D[/color]

    Since Ray is the diameter of the circle from the x and y points
    [color:#3366FF]> The ray is not the diameter but the ray. :D[/color]

    I would like to be able to get current Ray so that I can add and subtract an amount to resize the circle. The same would apply to the ellipse, (RayX and RayY).
    [color:#3366FF]> I can maybe do that but it will be a trick because circles and ellipses are only square with a tension... You can calculate the ray of the preset circle by calculate the distance between the middle and the point 0 (there is an expression in the object to calculate a distance between coordinates)[/color]

    When I use mouse is over and mouse clicks on circles and ellipses, the empty area in object's bounding box, (actually it seems even larger than what should be the bounding box) triggers the event rather than just the shape's inner area itself.
    [color:#3366FF]> I've not tried it but if you have activated the fine collision detection of the VectorialShape object, it's a MMF2 bug.[/color]

    I was looking for barycenter and I see you replaced the term with origin. I think that is a better term to use for regular users.
    [color:#3366FF]> I've not renamed it. The origin term is used for the origin of transformations. The barycenter is the gravity point of your shape.[/color]

    However, under Transformations you have Position (from barycenter) and so, to be consistent, that might be better as: Position (from origin), ey?
    [color:#3366FF]> You have "Position" which is from transformation origin, "Position (from barycenter)" which is from barycenter and "Position (from a point)" which is from a point of you shape. I'll not change that but it will be documented. ;)[/color]

    If you look at the example, you will see a bit of a glitch in relation to the edges of the circle and the fill. It guess you could call it "wobbly"
    [color:#3366FF]> I don't see any problem...[/color]

    So, I just want to spin that polygon, not rotate it around something else
    [color:#3366FF]> You should look at the "VectorialShape Example.mfa". If you use arrow keys, the shape will rotate. It's pretty simple: you set the transformation orgin to the barycenter of your shape, then you apply a rotation.[/color]

    EDIT: Too much smilies :D

    Please login to see this link.

  • If you look at the example, you will see a bit of a glitch in relation to the edges of the circle and the fill. It guess you could call it "wobbly"
    > I don't see any problem...

    Hmmm. Maybe it is my eyes or my video card ;) There is a very obvious wobble as if there are two circles transposed. We need others to test that on various cards, perhaps?


    Thanks for all the answers and the time you spent. This really helps me to learn the object better as we go along. I am trying ;) I imagine that my questions will help with the documentation you create, also.

    Oh, and you can never have to many smilies with an object like this one! Yahoo! :)

  • Wow. I hadn't played with the tension controls in your example until now. That creates some really nice effects.

    However, it also tends to bring out that glitch we see with the little tails or shooting lines :( If you increase and decrease the tension on most shapes in your example enough, you will see it.

    Maybe that's a clue as to where the glitch is coming from, perhaps? Thought I would note that.

  • Tension Optimization?

    If you play with the tension in your general example, large amounts of it, (negative or positive) tend to have a big impact on speed of rotation and the bouncing ball.

    I guess that large tension settings could be avoided when there are other objects moving around and such, if that is not fixable. Perhaps HWA will help with that later on.

    I assume that tension uses a lot of calculations and CPU there?

  • There is a very obvious wobble as if there are two circles transposed.
    > I don't know what is a "wobble"...

    Maybe that's a clue as to where the glitch is coming from, perhaps? Thought I would note that.
    > This bug is only with a thickness greatest than 1.

    Please login to see this link.

  • Wobble = You hit the front wheel of your bicycle on a curb. Then, you spin it and it wobbles back and forth because it is bent out of shape ;)

    So, I see it as if the circle and the fill are a little bit out of sync with each other as the yellow circle revolves around the center area. It is brief, but it is wobbly ... heheh.

  • Hum... Strange. I think it's impossible to have the fill render unsynchonized with the outline render because the two renders are done at the same time (fill just before outline)...

    It's maybe a problem of the MMF2 screen synchronisation: try the example with the V-sync activated for your application.

    Please login to see this link.

  • If you play with the tension in your general example, large amounts of it, (negative or positive) tend to have a big impact on speed of rotation and the bouncing ball.
    [color:#3366FF]> It's not the tension which impact the most on the application but fine collision detection. If you don't want fine collisions, you should deactivate it.[/color]

    I guess that large tension settings could be avoided when there are other objects moving around and such, if that is not fixable.
    [color:#3366FF]> If you remove the tension (set to 0), the segments will be straight... It's not a good idea. :D[/color]

    Perhaps HWA will help with that later on.
    [color:#3366FF]> All calculations are already hardware accelerated and multitheaded.[/color]

    I assume that tension uses a lot of calculations and CPU there?
    [color:#3366FF]> The tension don't use a lot of CPU but the fine collision detection of MMF2 yes. I'll maybe find a way to optimize it. ;)[/color]

    Please login to see this link.

  • If you don't want to loose fine collision detection but you want to speed up your application, you should check "fine collision detection" in the frame and then at runtime you can use the action "set fine collision on/off" when you want to apply effects. ;)

    Please login to see this link.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!