additive lighting + shadows. edit: .Capx

Show us your completed creations made in Construct 2

Post » Thu Aug 22, 2013 1:30 pm

Click to drag walls and light sources

+multiple sources
+lights are additive
+shadow casting objects can have any number of sides
+shadow quality adjustable
+background lighting

here's a screenshot of it working in a platformer i'm making.


here is the .capx file, requires the canvas plugin

I use multiple canvas objects, one for each light source.
Each canvas is only as big as its source's light sprite. Because they are not the same size as the screen, i have to multiply where the shadows should be by a ratio which you see in the events as 'ResMulti'.. The part where the shadows are actually drawn is similar to r0j0hounds original .capx a long time ago where it draws a quad for each pair of corners.

the additive lighting is done by using the (spoilers!) additive blending mode on each canvas, the layer they are all on has the 'multiply' shader. This combo is a replacement for using the 'destination out' method that only does black n white.keepee2013-08-30 00:05:38
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Thu Aug 22, 2013 2:35 pm

Wooooo impressive effect! Congrats!

Would love to see how to do that! :)
B
72
S
21
G
12
Posts: 314
Reputation: 12,111

Post » Thu Aug 22, 2013 2:42 pm

That's excellent I'm looking forward to seeing how it's done!
B
43
S
13
G
8
Posts: 622
Reputation: 7,392

Post » Thu Aug 22, 2013 11:36 pm

wow ! congratulations ! i have tested some ways to do that but it was impossible to get 60fps !
im really interested by seeing your capX! and your platformer seems nice !
B
19
S
5
Posts: 104
Reputation: 1,761

Post » Fri Aug 23, 2013 12:42 am

Man, this is awesome! Can't wait to get a look at the guts.
B
35
S
9
G
4
Posts: 201
Reputation: 5,170

Post » Fri Aug 23, 2013 1:31 am

I wanted to this for aaaages!! Really nice!
B
10
S
4
Posts: 133
Reputation: 1,543

Post » Fri Aug 23, 2013 5:31 am

THIS IS SO AMAZING!!!
is the shadow caster done through construct 2 plugins or your own?
B
29
S
6
G
2
Posts: 232
Reputation: 2,893

Post » Fri Aug 23, 2013 5:44 am

Nice one, Retro games would look better and having nice performance, doesn't matter we use high resolution graphics to port all platforms :)
B
97
S
35
G
29
Posts: 3,139
Reputation: 28,371

Post » Fri Aug 23, 2013 10:53 am

[QUOTE=KaMiZoTo] Wooooo impressive effect! Congrats!

Would love to see how to do that! :)[/QUOTE]
+1
B
34
S
9
G
1
Posts: 47
Reputation: 4,612

Post » Sat Aug 24, 2013 10:35 pm

very impressive and fast result :)

Did you code it directly in construct2 or using your how plugin ?
B
85
S
14
G
6
Posts: 72
Reputation: 7,237

Next

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 3 guests