Casting Shadows in C2

Show us your completed creations made in Construct 2

Post » Sat May 04, 2013 1:07 pm

Hi there,

I'm new to C2 and have been playing around with it a bit over the last couple of months. I've created a couple of dynamic lighting/shadow casting tests with it that I wanted to share.



The first is a shadow casting example (looks and runs best with a WebGL enabled browser), drag the circle at the centre of the light around to see the effect: http://www.adamduncan.com/LightingTest.

The first demo is pretty processor intensive (ideally needs to be run in Firefox or Chrome to see the effect at its best) and neither example has be optimised or anything. I was just playing around to practice with C2.

Any feedback is welcome.

Edit: the .capx file for the flashlight demo is at: www.adamduncan.com/Flashlight/source.zip

Edit: the .capx file for the lighting test is at: www.adamduncan.com/LightingTest/source.zip

Apologies for the complexity of it. I've since discovered a good example done by R0J0hound in this thread: http://www.scirra.com/forum/dynamic-shadows-now-possible_topic56174.html. I recommend looking at it as it is much cleaner and nicer than mine (didn't see it until after I'd done my examples).

Also, many thanks to R0J0hound for creating the canvas plugin that made these examples possible. To run the .capx files you'll need to download it from: http://www.scirra.com/forum/plugin-canvas_topic46006.htmlAdamD2013-05-08 18:47:11
B
2
Posts: 7
Reputation: 164

Post » Sat May 04, 2013 1:12 pm

I used the 'insert hyperlink' option for the post above, for some reason it didn't work and just posted the full url. Sorry about that, it also seems to have deleted the sentence with the second example in. Obviously I'm doing something completely wrong (I don't post on forums much). I'll try to post the flashlight example here: http://www.adamduncan.com/Flashlight.
B
2
Posts: 7
Reputation: 164

Post » Sat May 04, 2013 8:06 pm

Really nice! Any plans for using this in a game?
B
78
S
18
G
5
Posts: 175
Reputation: 7,391

Post » Sat May 04, 2013 8:13 pm

@AdamD
looks really good
B
18
S
5
G
7
Posts: 593
Reputation: 7,086

Post » Sat May 04, 2013 8:24 pm

Impressive! is this a custom webGL shader or something else?
B
90
S
30
G
24
Posts: 3,189
Reputation: 32,400

Post » Sat May 04, 2013 9:11 pm

Looks cool, I was wondering the other day how i'd do something like this. Any hints? :P
B
8
S
2
Posts: 63
Reputation: 1,223

Post » Sat May 04, 2013 9:58 pm

amazing effects =)
ImageImageImageImageImageImage
B
93
S
20
G
12
Posts: 1,211
Reputation: 18,473

Post » Sat May 04, 2013 10:40 pm

Very, very good ! Maybe you can provide the capx ? :)
B
40
S
9
G
5
Posts: 127
Reputation: 6,609

Post » Sun May 05, 2013 3:51 am

That's cool! I can see this getting some real use in some of the RPGs people are designing, for street lighting or day/night cycles.
B
50
S
15
G
11
Posts: 366
Reputation: 12,043

Post » Sun May 05, 2013 2:05 pm

Very impressive dude.
The 3D feel is astonishing !
B
25
S
5
G
1
Posts: 26
Reputation: 4,294

Next

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 0 guests