Glow in C2?

Forum Home Forum Home > Construct 2 General > How do I....?
 Post Reply Post Reply Page  12>
Author
1,890 Rep
Post Options Post Options   Quote Bob Thulfram Quote  Post ReplyReply Direct Link To This Post Topic: Glow in C2?
    Posted: 17 Apr 2012 at 8:02am
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!

Edited by Bob Thulfram - 17 Apr 2012 at 8:08am
Back to Top
16,464 Rep
Post Options Post Options   Quote newt Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2012 at 8:18am


You can fake it blurring an image, and setting it to position with another sprite, along with the additive effect.
Back to Top

Moderator
28,454 Rep
Post Options Post Options   Quote Kyatric Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2012 at 8:25am
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"
Back to Top
1,890 Rep
Post Options Post Options   Quote Bob Thulfram Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2012 at 8:45am
Originally posted by newt newt wrote:



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


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.

Edited by Bob Thulfram - 17 Apr 2012 at 8:46am
Back to Top
1,890 Rep
Post Options Post Options   Quote Bob Thulfram Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2012 at 8:57am
Originally posted by Kyatric Kyatric wrote:

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"


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!
Back to Top

Scirra Developer
78,144 Rep
Post Options Post Options   Quote Ashley Quote  Post ReplyReply Direct Link To This Post Posted: 17 Apr 2012 at 3:27pm
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.
Back to Top
5,545 Rep
Post Options Post Options   Quote Ugotsta Quote  Post ReplyReply Direct Link To This Post Posted: 19 Apr 2012 at 9:22pm
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.
Check out Nibble in the HBGames Build and Win Construct 2 Contest!
Back to Top
1,890 Rep
Post Options Post Options   Quote Bob Thulfram Quote  Post ReplyReply Direct Link To This Post Posted: 20 Apr 2012 at 5:06am
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?

Originally posted by Ugotsta Ugotsta wrote:

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.


Pushing block to kill things is actually one of my all-time favorites: Pengo!

Edited by Bob Thulfram - 20 Apr 2012 at 5:12am
Back to Top
5,295 Rep
Post Options Post Options   Quote Pode Quote  Post ReplyReply Direct Link To This Post Posted: 20 Apr 2012 at 7:56am
@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.
Back to Top
1,890 Rep
Post Options Post Options   Quote Bob Thulfram Quote  Post ReplyReply Direct Link To This Post Posted: 21 Apr 2012 at 6:03am
Originally posted by Pode Pode wrote:

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


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.
Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down