Glow in C2?

Get help using Construct 2

Post » Tue Apr 17, 2012 8:02 am

It looks like Classic Construct had some special effects, but I don't see the same in Construct 2. I'm looking for a way to make objects glow. Here's a YouTube example from an Android game called Evac by Hexage:

Evac by Hexage

The effect I'm looking for starts at about 18 seconds with the red glowing monsters, the glow around the pills, etc.

Another game I want to figure out how to make similar graphics to is Juggle by Denki:

Juggle by Denki

Any clues on how to do this?

PS: I saw the Gleam plugin but it isn't quite what I'm looking for. I'm not really sure how to make the effect visually, let alone the code to do so. Any help appreciated!Bob Thulfram2012-04-17 08:08:29
B
15
S
3
G
4
Posts: 122
Reputation: 3,532

Post » Tue Apr 17, 2012 8:18 am



You can fake it blurring an image, and setting it to position with another sprite, along with the additive effect.
B
104
S
32
G
18
Posts: 4,716
Reputation: 22,417

Post » Tue Apr 17, 2012 8:25 am

Your "glow effect" is nothing more than a colored sprite which borders are blurry (a gradient from the main color to transparent) and displayed with an opacity between 25 and 50 I'd say.
You can also add an additive effect eventualy.

Look in the c2\examples folder for the "Sprite effects.capx"
Moderator
B
154
S
52
G
28
Posts: 5,387
Reputation: 41,202

Post » Tue Apr 17, 2012 8:45 am

[QUOTE=newt]

You can fake it blurring an image, and setting it to position with another sprite, along with the additive effect. [/QUOTE]

This helps a lot. I can figure out how to blur things in Photoshop or some other art program.

Wow, what a quick and helpful answer.Bob Thulfram2012-04-17 08:46:59
B
15
S
3
G
4
Posts: 122
Reputation: 3,532

Post » Tue Apr 17, 2012 8:57 am

[QUOTE=Kyatric] Your "glow effect" is nothing more than a colored sprite which borders are blurry (a gradient from the main color to transparent) and displayed with an opacity between 25 and 50 I'd say.
You can also add an additive effect eventualy.

Look in the c2\examples folder for the "Sprite effects.capx"[/QUOTE]

This makes the glow effect clear. Look out, Denki, here I come!

Your explanation of what blurry is (a gradient) helped me even more. I know those from my days studying SVG.

And your reference to Sprite effects.capx was absolutely the perfect way to understand what additive really is. I'm so new to Construct I didn't even know about the examples folder.

I am in awe about helpful people here are. Wow, wow, wow!
B
15
S
3
G
4
Posts: 122
Reputation: 3,532

Post » Tue Apr 17, 2012 3:27 pm

FYI WebGL shaders will bring Classic-level effects to Construct 2, but it came pretty low in our last poll, so it might be a while before it's done.
Scirra Founder
B
204
S
134
G
43
Posts: 17,456
Reputation: 112,007

Post » Thu Apr 19, 2012 9:22 pm

I really look forward to the inclusion of shaders. I completely needed OR and ELSE logic so my vote was for that but shaders are my next vote!

@Bob Thulfram, funny you mentioned SVG because I recently posted about using the SVGCanvas plugin to create a blurring text effect. The filter code, derived from Inkscape, can be used with any SVG.

You could potentially draw an SVG shape at runtime and apply the filter to it. If your game will involve graphics as simple as those in the Evac game you linked to, I imagine you could use purely that.

By the way, that Evac game looks great and ironically, the idea of pushing blocks to destroy enemies is an idea I've had in my mind for quite some time now. Though my thought is to destroy the enemies by surrounding them with blocks. Cool game though, that Evac.
B
124
S
6
G
4
Posts: 178
Reputation: 7,019

Post » Fri Apr 20, 2012 5:06 am

I haven't had a chance to look at the SVGCanvas plugin (yours?). I've been studying SVG for quite a while and may see what I can do with special effects.

Do you know how much of the (huge) SVG spec the plugin supports?

Does it allow for DOM scripting?

[QUOTE=Ugotsta]By the way, that Evac game looks great and ironically, the idea of pushing blocks to destroy enemies is an idea I've had in my mind for quite some time now. Though my thought is to destroy the enemies by surrounding them with blocks. Cool game though, that Evac.[/QUOTE]

Pushing block to kill things is actually one of my all-time favorites: Pengo!Bob Thulfram2012-04-20 05:12:05
B
15
S
3
G
4
Posts: 122
Reputation: 3,532

Post » Fri Apr 20, 2012 7:56 am

@Bob Thulfram : I have designed the SVGCanvas plugin to make it possible for you to use SVG string directly for things that I haven't added yet for the moment. So, if you want something that isn't available in the menu now, you can simply "paste" the string. And if you have JS embedded properly in that string (declared properly with [CDATA[ and all), I don't see why you can't use it .
There's one catch, though : your script can only manipulate the index.html page, and the SVG DOM. Everything else (apart from some other plugins) in C2 is rasterized on the <canvas>, so you won't be able to script that.
B
33
S
8
G
5
Posts: 705
Reputation: 6,045

Post » Sat Apr 21, 2012 6:03 am

[QUOTE=Pode] @Bob Thulfram : I have designed the SVGCanvas plugin to make it possible for you to use SVG string directly for things that I haven't added yet for the moment. So, if you want something that isn't available in the menu now, you can simply "paste" the string. And if you have JS embedded properly in that string (declared properly with [CDATA[ and all), I don't see why you can't use it .
There's one catch, though : your script can only manipulate the index.html page, and the SVG DOM. Everything else (apart from some other plugins) in C2 is rasterized on the <canvas>, so you won't be able to script that.[/QUOTE]

Still sounds very cool. Do have any samples to share so I can see it in action? I'm most interested in using the SVG DOM, especially in a programmatic way that is supported by HTML5.
B
15
S
3
G
4
Posts: 122
Reputation: 3,532

Next

Return to How do I....?

Who is online

Users browsing this forum: gdcloud, irina, Magistross, yusufbasbogaoglu and 1 guest