Rendering Sprites By Line

Get help using Construct 2

Post » Sun Jun 04, 2017 1:15 am

Is it possible to manipulate sprites by line or pixels? Is there an effect or plugin something that can do this? Using an example here (done by sliding a solid white sprite on a solid white background)

Image
B
30
S
14
G
6
Posts: 29
Reputation: 5,507

Post » Sun Jun 04, 2017 2:19 am

You could try using blend modes using the approximate method of the gif.
Image ImageImage
B
169
S
50
G
173
Posts: 8,316
Reputation: 110,276

Post » Sun Jun 04, 2017 3:38 am

@Smedis2

There is no simple way, so, like Newt said, using blend modes can give you the effect you want. To do that you have to put the sprite on a layer that forces its own texture, then put a "mask" sprite that has its blend mode set to Destination Out on top of the mummy sprite. The mask sprite has to be on the same layer...

I made a quick demo... http://www.rieperts.com/games/forum/MummyReveal.capx

I tried it 3 different ways:
1) Reveal - just like your sample, the mask lifts up.
2) Pop up - where the mummy pops up from behind the mask
3) Adjusting the Height of the mummy from zero to 100%. This method does not need a mask. or a layer that forces its own texture but might not look as nice. It sort of looks like the image was lying down flat and "flips" upright...
B
96
S
33
G
20
Posts: 438
Reputation: 17,665

Post » Sun Jun 04, 2017 8:09 am

Well, this (particular one) is easy to do in the image editor.

Open the sprite in the image editor. Window showing the animation frames should pop up too.
Assuming that there is only 1 frame.
Right click that frame .. choose Duplicate. Select that duplicated frame.
Select the Rectangle Tool in the image editor, Right click/drag the first line of pixels away.
Right click that frame in animation window .. choose Duplicate. Select that duplicated frame.
Select the Rectangle Tool, Right click/drag the first line of pixels away.
and so on .....

Reverse the frames.
B
33
S
18
G
28
Posts: 2,493
Reputation: 20,950

Post » Sun Jun 04, 2017 1:37 pm

@Smedis2

Simplest way I can think of is to use a TiledBackground for the image and adjust it's Height over time

capx (r244)

Once fully loaded you can replace it with a Sprite, if that's what you need. I've just set it to loop for the example.

Note: I use negative values for the Height to render from bottom to top
Find all the Construct 2 games that were on Steam Greenlight here
B
33
S
9
G
7
Posts: 451
Reputation: 6,782

Post » Sun Jun 04, 2017 2:56 pm

Thank you all for your answers! All of these seem close the ideas I had in mind. I was wondering if there was an in-engine way of messing with the way sprites are drawn, but these will work too.
B
30
S
14
G
6
Posts: 29
Reputation: 5,507

Post » Tue Jun 06, 2017 6:37 pm

http://gigatron3k.free.fr/Intro/

https://www.shadertoy.com/user/gigatron

https://twitter.com/realistquantum

Ezekiel 1-4 ; ufo landing explanation ..

CONSTRUCT 2 THE ONLY FAST WAY TO HTML5

Image
B
61
S
21
G
29
Posts: 821
Reputation: 22,205


Return to How do I....?

Who is online

Users browsing this forum: mcscooter and 23 guests