How do I create a world of goo mouse effect?

0 favourites
From the Asset Store
A set of 15 images, including 3 Hero Animations, 5 Goo Animations, and 7 posters!
  • Hi everyone,

    So I did some testing with families thinking this would be the trick.. but what i'm trying to do is make an effect like it is in world of go. here is an example

    Subscribe to Construct videos now

    the idea was that the toon effect I thought might be able to surround all items in a family.. since i know each single instance doesn't act this way. however my testing so far has come up with the same result.. each instances has the circle around it.

    Thanks,

    Caleb

  • Put all the objects in one layer and give the layer that effect. You may need to set "force own texture" to true.

  • I'd say you will need to combine a dedicated toon sprite with faded edges with a particle emitter with balls of the same colour with faded edges both on an alpha threshold effect layer to blend the surrounding or trailing sprites while keeping a solid outline, behind the sprite you want to outline.

    There is a download on the first post here

  • R0J0hound what is the purpose of force own texture?

    NetOne that's interesting, i never knew about that approach!

    the one thing i do seem to have trouble with though is that i'm doing "while in touch" with surface which is effectively "every tick" I believe.. however if i move too fast.. you see gaps in the balls which breaks the effect. i think that the effect in world of goo likely does some kind of vector / fill.. where we have to use sprtes.. one thought i had was to do some kind of stretch effect.. i don't have an exact system worked out but

    The purpose of the question is that i want to be able to draw lines similar to world of go.. that are unbroken solid "drawn" lines.. that would vanish after say.. 1 second.. basically just like the world of goo effect just a little bit more of a delay before the line vanishes.

  • Dude check this, did it with the alpha threshold , its not perfect it is near, and left click for some fun

    the cap x is there as well

    https://www.scirra.com/arcade/rikoshe-m ... rser-14400

    (note don't go widescreen or full screen as it seems to slow down the curser, don't know why this is, I think it is a scirra arcade bug)

  • wow that's really nice. so it looks AWESOME when you move slow, but see how it breaks into pieces if you zip across? I need to find a way to make ita solid no matter how fast.. world of goo example is continuous.. and i mean maybe they are using tricks like vector or something which C2 can't do. So I get it if maybe it's not possible..

    My best idea so far is that maybe figure out a way to make square sprites stretch and connect each dot.. maybe slow down the spawn rate to 0.1 and let the linking between "points" be what fills the gaps maybe. I remember one time figuring out how to stretch a sprite between fixed point and mouse position. makes a nice "elastic" effect when done right.. just have to remember how to do it

  • I see.

    if you study the video you posted you will see that the guy is controlling the speed to preserve the tail.

    and at around 6-7 seconds when he moves fast (if you pause) you will see a trail of balls.

    so he is either fading to destroy or reducing the size of the balls then destroying at a certain size

    but you cant get rid of the balls , maybe just fine tune the reduction and destroy size.

    but yea you could draw lines between the last 2 balls every tick and destroy them in line with the balls.

    if you move fast though you will get a long line.

    unless maybe you could destroy balls that are a certain distance from the curser

    or destroy balls that are not overlapping another ball

    hmm tricky one....

  • yea well one thing NetOne that could help with the long line problem is to have a count.. so that after so many ball/lines are made the oldest get destroyed but exactly how i'd do that.. i'm not sure yet.. it's an old game i made with gamesalad that i want to modernize and C2 has a lot more options than GS ever did so I know i could really blow it out of the water.. but yea have to work it out first..

  • Another alternative is to check the distance between that current and last and add more circles in between. It's a bit of trigonometry, but fairly basic.

  • I never got into trig but your suggestion is valid for sure. i could look into it for sure thanks for the tip!

  • "Force own texture" draws the layer to it's own texture first as opposed to directly to the canvas. For it's uses do a forum search for it for lots of examples.

    Also here's an example of a continuous blob.

    https://dl.dropboxusercontent.com/u/542 ... 0blob.capx

    It's not really trig, it's more just interpolating between the old and positions of the mouse and setting the size accordingly.

    Notice when moving fast you can see the polyline path of the mouse. It can be made smoother by using a cubic interpolation between the points. However, I haven't the time to do it today.

  • holy crap that's incredible. R0J0hound excellent! yea i don't think i'd have ever come up with a system like that for sure. Thanks for that!

    It's fascinating to see what is possible with C2 that at first I think.. i'm not sure that's possible.. way cool.

    Thanks!

    Caleb

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • here I did it with lines, its a bit rough could do with some more tweaking and ive drawn between the last two balls instead of the curser ball so that would need to be sorted. didn't do the outline this time..

    but no more balls.....

    https://www.scirra.com/arcade/other-games/goo-two-14408

    R0J0hound and I must thank R0J0hound as well as I was using this as an excuse to try the function call idea he gave me earlier. and it worked a treat. cheers.....

    looks like I need to update C2 to see what R0J0hound did for this ..... damn

  • that looks really sharp also. is there a way to get rid of the dot though?

  • hey , freezeframe...I feel exposed....Yea , that dot is the curser sprite. i was testing different things and forgot to change before i uploaded.

    Currently its drawing between the last two sprite2 points spawned.

    Instead just change the objects in the drawline function to the last sprite2 point spawned, and the curser sprite (sprite).

    Also, it looks like the ball sprites are not centred ...sloppy work indeed

    Ill update the arcade files later

    Cheers..

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)