[How to]Pixel level disassemble and manipulate image

Share your Construct 2 effect files

Post » Sat Aug 29, 2015 12:39 pm

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?
B
29
S
5
G
5
Posts: 139
Reputation: 5,830

Post » Sun Aug 30, 2015 8:44 pm

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.
Stuff I'm working on:



http://www.jamdonut.com
B
13
S
3
Posts: 88
Reputation: 1,025

Post » Mon Aug 31, 2015 5:00 pm

@aJamDonut: Thank You! I'm looking for code samples.
B
29
S
5
G
5
Posts: 139
Reputation: 5,830

Post » Mon Aug 31, 2015 9:02 pm

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
B
92
S
32
G
109
Posts: 5,290
Reputation: 70,991

Post » Tue Sep 01, 2015 12:19 pm

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. :D
B
29
S
5
G
5
Posts: 139
Reputation: 5,830


Return to Effects

Who is online

Users browsing this forum: No registered users and 0 guests