0 Favourites

Shadows light and fire

This forum is currently in read-only mode.
  • 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?

  • 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.

  • Ah didn't think of that, I'll give it a shot.

  • 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.

  • I turn on additive plus and the shadows disappear

  • I turn on additive plus and the shadows disappear

    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

  • 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.

  • 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

    edit: Nevermind... Randomly one or two won't become see through, changes every time I run it. Wtf am I doing wrong?

  • 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).

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

    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.

    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.

  • 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.

  • A screen resolution of 1280x1024 will cause most graphics cards to process effects as though it were a texture of 2048x2048... which chokes my graphics card to death. I was getting about 4fps, yay.

    Anyway, I run my desktop at 1280x1024, so having a window the size of my screen is a bit much . It would probably run a bit better at fullscreen, though. I didn't try. Then again, I suppose I'm not he target audience for your game.

    One tip, though: your ground texture (and the bumpmap that goes with it) are twice the size that they need to be. The images are 512x512, but the repeating tile within the texture is only 256x256 in size. You can cut the image in half both in x and y and it will still tile normally, and save yourself 16 times the VRAM and four times the GPU processing time on your bumpmap. Just a heads up.

    Oh, and putting 3 different blur shaders on a blank image isn't going to do anything but waste GPU time.

    And if you want to make the light not so white-looking, try changing the color filter in the object properties to something more rosy-tan-ish colored to match the floor.

  • Ah thanks, will start working on that. As I said I'm new to construct coming from game maker, not used to having to worry about how much system resources I'm using

    If you like diablo then you would be the target audience. I'll work on cutting things down, the computer at school we would be demoing this on is garbage so I'm sure it wouldn't hurt.

    edit: Where can I change the size of the ground texture and bumpmap? I only see the starting point X and Y and then the height and width I want it to cover.

  • It was 1280x1024 that isn't a standard resolution?

    No

  • [quote:3j5p2c32]Higher than 1024�768, 57%

    I think the majority if not all gamers would be in this bracket. I haven't seen a screen under 1280x1024 in years at LAN parties. The most common I see is 1680x1050. I guess it all comes down to who your target audience is. I'm not making this game for netbooks or ultraportable laptops

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • Ah I see what you mean, the texture was repeated inside the 512x512 image I was using. I cut it down to 256x256 in GIMP. I thought you meant that I had some setting wrong in construct lol

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)
Similar Topics Posts Views Last Post
Unread hot topic
308 38,074
damainman's avatar
damainman
Unread hot topic
107 13,190
LeuNoeleeste's avatar
LeuNoeleeste
Unread hot topic
74 8,085
eli0s's avatar
eli0s