0 Favourites

[How to]Pixel level disassemble and manipulate image

  • Does anybody know a modern solution:

    .. to the old scene special effects - then coded in ASM - that took a picture, took it apart at the pixel level and made it explode, made the picture pixels behave like water waves, etc..

    Example:

    Take the pixels of a 16x32 flame sprite, store them in memory and make a plasma animation torch effect from the image - using the sprite's pixel colors. Make the pixels flow like a flame, adding little sparkler sparks shooting out (from the flame) from time to time, make the flame alive.

    Melt-flow plasma effect:

    1. Take the pixels from an enemy character sprite,

    2. create an animation: leave the first frame unchanged = showing the enemy

    3. then make the pixels melt like ice - a downward plasma flow - then splash the whole fluid mass to the ground in the end.

    Does anybody know of a code somewhere that can manipulate sprites at the pixel level like this?

  • I know it is possible with Javascript if you could code that as a plugin, but I don't know of any Construct 2 ready samples. Do you just need some links/knowledge on the effects in general on canvas? I know a few sources and can dig them out if required.

  • aJamDonut: Thank You! I'm looking for code samples.

  • Construct 3

    Buy Construct 3

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

    Buy Now Construct 3 users don't see these ads
  • Basically you'd make a sprite per pixel. You can access the pixels with the canvas object. In the example below I just had a separate frame per color. Then the melting effect is just a matter of giving a delay to the pixels before they will fall.

    https://dl.dropboxusercontent.com/u/542 ... /melt.capx

  • Thank You for your help, R0J0hound!

    I installed your awesome plugin. Studying the code, because it was years I coded anything. Planning R&D as well to realize flames from a single camp fire sprite, candles, swamp gas and other stuff.

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