[request] port Shadow caster behaviour from C1

Post your work in progress addons and get feedback

Post » Mon Dec 30, 2013 12:53 am

I just found out that construct 1 has some features that are not available in construct 2:

http://sourceforge.net/apps/mediawiki/construct/index.php?title=Shadow_Caster_Behavior

Would it be possible to port this behavior to construct 2? Currently this is a commonly requested feature and people have found multiple dirty hack ways to do an implementation. But the implementations are not ideal.
I want to be able to use as a condition IS PLAYER OVERLAPPING SHADOW.

The CANVAS plugin approach simply draws the shadows. You can not use the shadows as a gameplay mechanic (for stealth or health)

There is another dirty hack that is too expensive on the cpu- using the LINE OF SIGHT behavior combined with lots of shadow pixel sprites.   

It's hard or impossible to do a stealth game without this key feature.

This is a really old request- since the c1 days old:
http://www.scirra.com/forum/shadow-caster-check-if-object-is-under-shadow_topic39489.html
http://69.24.73.172/scirra/forum/viewtopic.php?t=4159&p=33186

there are many more threads with no propper solutions

If there is a math wizard on this forum, please make the world better for everyone. Have a look blurymind2013-12-30 01:11:52
B
40
S
15
G
4
Posts: 426
Reputation: 5,870

Post » Mon Dec 30, 2013 3:37 am

Have you taken a look at this yet? It might be helpful.

https://www.scirra.com/tutorials/780/how-to-cast-shadows-that-change-with-time/page-1

-for each shadow
-if player is overlapping shadow
B
62
S
20
G
56
Posts: 1,077
Reputation: 36,021

Post » Thu Jan 02, 2014 4:21 pm

It's not good enough for the type of Game I want to use it in.

The only shadow hacks that are half useful on construct 2 are here
http://www.scirra.com/forum/another-waste-of-time_topic83212_post485669.html?KW=#485669

the guy is not happy with his solutions yet either.

I think shadows should not only be a graphics shader. They should be a behavior (condition) that can affect gameplay.blurymind2014-01-02 16:23:12
B
40
S
15
G
4
Posts: 426
Reputation: 5,870

Post » Thu Jan 02, 2014 6:31 pm

Shaders can't effect gameplay. Shaders are a post process on the the display memory of the GPU. This means the shadow has no value in game space; and so can't really effect gameplay.

shadows to be effective in gamplay means shadows need to be an object in the game. In one form or another.
B
92
S
18
G
9
Posts: 2,455
Reputation: 15,113

Post » Thu Jan 02, 2014 8:14 pm

makes me wonder how they did it in Stealth bastards. Maybe whats visible is a shader. But whats happening under the hood is the engine is drawing a colision object based on angles.

What I really need in order to use a shadow as a condition is a dynamic colision polygon, that mimics the shape of the shadow drawn by the shaderblurymind2014-01-02 20:15:31
B
40
S
15
G
4
Posts: 426
Reputation: 5,870


Return to Work in Progress Addons

Who is online

Users browsing this forum: No registered users and 2 guests