[CAPX] Yet another shadow caster

Show us your completed creations made in Construct 2

Post » Tue Aug 27, 2013 2:36 pm

https://dl.dropboxusercontent.com/u/5426011/examples18/shadow_cast_2.capxr142

Yet another shadow caster example but this one is has a capx to dissect. It's probably very similar to what keepee did in his example. The shape of the objects is defined by imagepoints.

Features:
* Colored additive lights.
* Changeable shadow color.
* Adjustable resolution to get a balance between look and performance. R0J0hound2013-08-27 14:39:14
B
94
S
33
G
114
Posts: 5,359
Reputation: 73,779

Post » Tue Aug 27, 2013 4:20 pm

Nice work, as always, R0J0hound. You might want to mention that this needs your Canvas plugin in order to view.
If your vision so exceeds your ability, then look to something closer.
Moderator
B
136
S
31
G
87
Posts: 5,497
Reputation: 60,280

Post » Tue Aug 27, 2013 4:27 pm

Very cool. I like the effect when you place a light ON a shape!
ImageImageImage
B
71
S
22
G
249
Posts: 3,763
Reputation: 138,577

Post » Tue Aug 27, 2013 6:07 pm

Oh cum on , rogo :O

Where did you find out about my method :3

Edit:

@Ashley , Can you give us access to the collision polygons points in runtime ? That would make much stuff easier ...Whiteclaws2013-08-27 18:38:03
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,471

Post » Tue Aug 27, 2013 6:38 pm

great!
B
12
S
3
G
1
Posts: 347
Reputation: 2,866

Post » Tue Aug 27, 2013 8:07 pm

hey, actually i did it kinda different... I used a canvas for each lightsource.. Yours is faster.

I was going to say it'd be cool if anyone improved upon it but you're way ahead of me haha.

Check my array for the imagepoints though, that way it doesn't need to repeatedly calculate the same things when drawing the shadows..
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Tue Aug 27, 2013 8:54 pm

Really impressive work, Construct2 really need to have some native lighting system like that :)

Impressive work !!!!
B
85
S
14
G
6
Posts: 72
Reputation: 7,237

Post » Tue Aug 27, 2013 9:27 pm

Well , Rojo Extended my capx , so no need for me to continue upon it ...

But same method than the one I used :D
B
42
S
17
G
17
Posts: 2,247
Reputation: 17,471

Post » Wed Aug 28, 2013 7:13 pm

[QUOTE=ThunderZ] Really impressive work, Construct2 really need to have some native lighting system like that :)

Impressive work !!!![/QUOTE]

Then Construct would be too awesome to handle by me
ImageImage
B
111
S
51
G
24
Posts: 787
Reputation: 23,394

Post » Fri Aug 30, 2013 12:43 am

I'd like to use your two-canvas method as it's (in cases of 2+ lights) faster than doing the canvas-for-each-light thing that I did.

But I've tried and failed to get it working neatly with scrolling, rotation and scaling, because the main canvas should really fill the screen on a stationary layer.. I can't think of any way to paste the light sprite(or falloff) the way it'd be required to. Was wondering if you had any ideas.

the canvas-for-each-light method doesn't require any extra fiddling, I included this stuff when i updated with the new plugin if you want to have a look

edit: also needs to work alongside standard non-shadowcasting lights that don't need to use canvas.. this complicates things morekeepee2013-08-30 00:47:36
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Next

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 1 guest