Shadows light and fire

For questions about using Classic.

Post » Mon May 18, 2009 5:27 am

For my final project in game dev class my friend and I decided to use construct over game maker because it's a million times better. We decided on doing a steampunk dungeon crawl with a diablo feel and we have 4 weeks to do it.

A couple issues I need help with:
1) Shadows either end abruptly or go on forever, is there a way to have them fade out?

2) Light sources don't end either, I can have a light source from a fire on one side of the map, and on the other side put some shadow casting objects and they will get a shadow from that light source. I want to limit the range that a light can make shadows to a little more than the visible area it creates (and have those shadows fade out)

3) It's a top down view, not angled like diablo is (to make it a bit easier to make in our time frame). Is there any way to make a convincing looking fire/torches/candles for a top down view?
B
2
G
3
Posts: 16
Reputation: 882

Post » Mon May 18, 2009 5:37 am

I haven't used shadow yet, so I can only comment on 3)

I'd say do a plasma-ish thing with red bits and add a waving distortion on top of everything (for hot air refraction). The distortion will cue most people on the heat, the red bits on it being fire.
B
3
S
2
G
4
Posts: 1,445
Reputation: 4,665

Post » Mon May 18, 2009 7:03 am

Ah didn't think of that, I'll give it a shot.
B
2
G
3
Posts: 16
Reputation: 882

Post » Mon May 18, 2009 7:10 am

Applying an effect like additive plus at to your lights will make their shadowing range only as large as their radius. Also, I'd set the power of the additive effect to 50%. This will make the shadows look much better.
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Mon May 18, 2009 3:57 pm

I turn on additive plus and the shadows disappear :?
B
2
G
3
Posts: 16
Reputation: 882

Post » Mon May 18, 2009 10:12 pm

[quote="SciTE":1o5aheot]I turn on additive plus and the shadows disappear :?[/quote:1o5aheot]

Did you keep the default image on the light, or did you get rid of it? The image needs to be there or it won't work.

Example
Moderator
B
98
S
37
G
19
Posts: 1,584
Reputation: 17,817

Post » Mon May 18, 2009 10:39 pm

I erased the image of the light because I want it to be clear. Instead, I have a second layer on top that is black with the image for the light (that layer is set on multiply plus). The reason I do it this way is because the 3D boxes become see through when the light is in a layer above them or in front of them in the objects bar.

.cap: http://willhostforfood.com/?Action=down ... leid=66794

Not using that sprite as the main character, that is just a placeholder.
B
2
G
3
Posts: 16
Reputation: 882

Post » Tue May 19, 2009 2:48 am

Eh, I found a way to do it, but it's a bit of a pain. In the layer with the lights I create an identical box that casts a shadow. In the world layer I create the box with the sprites I want to use and place it over the shadowcaster. Works perfectly now I just have to create a shadowcaster object for every object in the world layer :cry:

edit: Nevermind... Randomly one or two won't become see through, changes every time I run it. Wtf am I doing wrong?
B
2
G
3
Posts: 16
Reputation: 882

Post » Tue May 19, 2009 4:44 am

[quote="SciTE":1a4v2833]I erased the image of the light because I want it to be clear. Instead, I have a second layer on top that is black with the image for the light (that layer is set on multiply plus).[/quote:1a4v2833]

Well, that image needs to be there for the shadows to work properly.

[quote="SciTE":1a4v2833]The reason I do it this way is because the 3D boxes become see through when the light is in a layer above them or in front of them in the objects bar. [/quote:1a4v2833]

I don't know what you mean they become see-through. I replaced the light gradient image and tested it and it's working fine.

http://dl.getdropbox.com/u/529356/lights.cap

I had to remove a bunch of shaders and resize the the window, though. Apparently you're making this on a supercomputer? Yikes.
Moderator
B
5
S
2
G
6
Posts: 4,348
Reputation: 10,971

Post » Tue May 19, 2009 5:18 am

The issue is having that image makes it have the white overlay, I want it to be clear. What shaders? It was 1280x1024 that isn't a standard resolution? I have a M1730 (core2duo 2.5 GHz dual 9800M GT 17" monitor with 1900x1200 resolution), granted a bit more powerful than average but no where near cutting edge.

edit: Is it possible to lessen or eliminate the white fog look that image creates? Or does it have to be exactly like that to work?

edit2: Ah ok, yeah I meant to take the blurs off before hand, I was just trying different things trying to get that shadows to look right.
B
2
G
3
Posts: 16
Reputation: 882

Next

Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 5 guests