how do i make a mining/digging effect

Get help using Construct 2

Post » Wed Jun 12, 2013 7:15 pm

hi guys, i would like to know if is possible to get a digging effect similar to the one shown in the following youtube video:

https://www.youtube.com/watch?v=x7UfvtdpzgU#t=18s


edit: added screenshot


Is there anyway to do this besides using 'on collision destroy'
I have tried doing a similar effect using an array + on collision destroy behavior but it was super laggy.

thanks!hyena2013-06-12 23:33:34
B
7
S
3
G
1
Posts: 12
Reputation: 1,214

Post » Thu Jun 13, 2013 2:52 am

bummmmp
B
7
S
3
G
1
Posts: 12
Reputation: 1,214

Post » Thu Jun 13, 2013 4:34 am

I'm assuming you mean the hollow paths left out by the characters.

The way I see it, you have a layer of the "dug out dirt" either above or below the gameplay layer.

Then you use a round invisible object on character as a Mask so it either "cuts away" the pieces of layer it moves through or rather puts the dirt pieces ontop of the layer.

Another way is to make it spawn a "dirt circle" ontop of the character every time he moves one pixel in any direction, but that would mean having an obscene amount of sprites on the screen eventually and even though they're static i'm not sure how the engine would handle those very well.

I believe WebGL effects are responsible for these things, but since i'm not using WebGL at all I can't really help further than that, sorry.Xionor2013-06-13 04:56:52
B
10
S
3
Posts: 233
Reputation: 1,537

Post » Thu Jun 13, 2013 5:04 am

yes, that is exactly what I was referring to, thank you for your response and I will play around with what you have suggested, sounds promising :)
B
7
S
3
G
1
Posts: 12
Reputation: 1,214

Post » Thu Jun 13, 2013 5:26 am

You might find that what is really happening is a very large Array that stores every pixel of "dirt" in the screen/layout resolution..

when the players/ digging object comes into contact with the onscreen array dirt..it is removed from the array's corresponding position..

basically set up by the onscreen pixel coordinates

its been done in many games before..

When in doubt..or you are lost in a Zombie apocalypse or someone is giving you a hard time..Remember one thing..... Read the Construct 2 Manual..it will save your life.:)
B
34
S
13
G
8
Posts: 317
Reputation: 7,668

Post » Thu Jun 13, 2013 10:09 pm

As stated previously, i have tried arrays, even a small array (10 pixels by 10 pixels) is unplayable.



hyena2013-06-14 08:15:01
B
7
S
3
G
1
Posts: 12
Reputation: 1,214


Return to How do I....?

Who is online

Users browsing this forum: No registered users and 6 guests