Is there a way to illuminate the floor/tiles in a 2d platformer?

Welcome to our brand new Clickteam Community Hub! We hope you will enjoy using the new features, which we will be further expanding in the coming months.

A few features including Passport are unavailable initially whilst we monitor stability of the new platform, we hope to bring these online very soon. Small issues will crop up following the import from our old system, including some message formatting, translation accuracy and other things.

Thank you for your patience whilst we've worked on this and we look forward to more exciting community developments soon!

Clickteam.
  • Hi all,

    I have a small issue, I'm wondering if it's at all possible to light up the floor underneath the player character?

    At the moment I have a very simple circle gradient which is on the layer behind the player and tiles. This is fine and looks nice enough, but I'd prefer to light up *only* the floor, if that's possible?
    I was looking around for any shaders that could potentially ignore one layer and appear on objects on a different layer, for example, but I'm not sure something like that exists.

    I've cheesed it in the video clip to show what I mean, although you can obviously see the problem with doing it that way:pacman:

    Please login to see this link.

  • Yeah I suppose something like that could work, and maybe having a proximity sensor to adjust the semi transparency. At the moment I've gone with this, not sure how viable it'll be in the long run, but I've placed the bottom part of the floor on a different layer so it overlaps the light: Please login to see this attachment.

  • You can use Subtract on a layer and then black objects will create "holes" in it. But of course then the rest of the screen needs to be at least a bit darker so that the effect can be seen as lighting something up.

    Or the good old Add efect is often used for that. You would need to have on an object that is only covering the floor.

  • Ah I do have a subtract layer, dark grey object for the screen and an object with a hole to create that flashlight effect already but like you said, it creates holes rather than lights.

    The add effect is what I've used in that screenshot, but with a slight blend coefficient. I do kind of like having a bit of light behind the player too.

    I would use an object that only covers the floor but I'm not sure how to go about doing it because, the tiles vary alot in shape and angle, so I think eventually it would "clip" somewhere and break the illusion. Hence why Ive just blocked it completely by using the layer on top.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!