Dynamic Shadows "engine" for C2

Show us your completed creations made in Construct 2

Post » Sat May 04, 2013 1:21 pm

This is really cool. I've just posted my experiments in lighting with C2 here: http://www.scirra.com/FORUM/topic67369.html. Apologies if that just shows the URL and not a link you can click, I have BBcodes enabled but it doesn't seem to be working for me (no idea what I'm doing wrong as it previews perfectly).

I'm very impressed that you're doing the effect in just 7 events, I'm obviously doing it the hard way as mine are a lot more than that. Good work
B
2
Posts: 7
Reputation: 164

Post » Sat May 04, 2013 2:05 pm

Thank you for all this nice feedback. I made one more test. This time with fairly simple 2D Ambient occlusion. It could be handy for creating some depth to levels. I tried to follow what I've learned from Ambient occlusion in 3D. As with the other examples it uses snapshot to create picture file that is then loaded to the scene. AmbienOcclusion

@AdamD
Good job with your experiments. You have lot of details on the shadow behaviours.nemo2013-05-04 14:06:58
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Post » Sat May 04, 2013 2:15 pm

@AdamD

That's great! How many events is this?
@bearboxmedia
www.bearboxmedia.com

Nintendo Wii U Developer using Construct 2
B
68
S
8
G
6
Posts: 930
Reputation: 9,358

Post » Fri Jun 28, 2013 12:39 pm

How did you do the Dynamic Shadows? Would you be up for sharing the capx?
B
39
S
12
G
8
Posts: 580
Reputation: 7,108

Post » Fri Jun 28, 2013 12:54 pm

[QUOTE=CrudeMik] How did you do the Dynamic Shadows? Would you be up for sharing the capx?[/QUOTE]
If not for the capx, any hint how you did it with such light CPU usage ?
B
17
S
7
G
4
Posts: 461
Reputation: 5,907

Post » Fri Jun 28, 2013 1:19 pm

@CrudeMik @Guizmus

It's just a really simple trick. I create 60-100 sprites that are looking like flashlight beams and set their angles to random(360) and random lenght. They are created on one layer that is set to be transparent. Now how to create the illusion of shadows being cast? Every time one of these light beams touch a wall, it will get disabled and your game don't need to draw it. So actually the more obstacles there is the faster your game should run due to less drawing to be made. The more beams you create the more realistic it will look. There's lot of tricky adjustments to be made. This is a good trick because you can have multiple light sources and you can adjust the amount of beams created and make it run also on slower systems. nemo2013-06-28 13:22:12
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Post » Fri Jun 28, 2013 3:27 pm

Looks nice :). I know this is might be irrelevant, but I tried it on iPhone4 and it works although FPS is never more than 7. When updating (either moving the light or other objects that produce shadow) it drops to 3. I wish I could use this kind of effect on a mobile browser :Dsoybean2013-06-28 15:34:44
B
21
S
5
G
5
Posts: 58
Reputation: 5,232

Post » Sat Aug 31, 2013 7:23 pm

@nemo This is awesome, I cannot say how much happy I am after seeing suck effects in C2. I want such kind of light effects in 2D platformer can you please help me. I will be very much happy if you can.

Thanks in advanced.
Bye bye take care.
B
89
S
16
G
13
Posts: 199
Reputation: 12,987

Post » Sun Sep 01, 2013 6:44 am

What a cool effect.

This is not as nice looking but should give everyone the basic idea.:
-=File deleted=-
What an awesome trick @nemo Thanks so much for sharing.

I think I may use something like this in my underworld levels 8)

EDIT : here is a new one:
https://www.dropbox.com/s/e01ib8jv8km90tf/lightandoccluder.capxjojoe2013-09-01 09:53:36
B
28
S
8
G
4
Posts: 767
Reputation: 5,940

Previous

Return to Completed Creations

Who is online

Users browsing this forum: No registered users and 3 guests