0 Favourites

how do i make a mining/digging effect

  • 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:

    edit: added screenshot

    <img src="http://i.imgur.com/UxRB0tn.png" border="0">

    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!

  • bummmmp <img src="smileys/smiley1.gif" border="0" align="middle" />

  • 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.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • 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 :)

  • 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..

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

    <img src="http://i.imgur.com/9nV4mka.png" border="0" />

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread sticky
276 261,919
gamecorpstudio's avatar
gamecorpstudio
Unread hot topic
167 14,500
DMT2005's avatar
DMT2005
Unread hot topic
164 38,114
totoe's avatar
totoe