How do I fix weird shadowcasting with tilemaps?

0 favourites
  • 1 posts
  • Howdy everyone! I've been chipping away at my new game, and I've run into a few hurdles while working on the lighting system.

    I've managed to get my tiles to ALMOST look like terraria, with the tiles fading away as they get further away from the surface. However, as you can see in the screenshot below I have some weird issues with it. Some layers don't have any shadows, and weirdly won't get darker until I break more blocks into it.

    The light object is in the middle of the layout, -224000 pixels up to try and emulate the sun (I had been experimenting with having it rotate around the world, but that resulted in a bunch of shadows being cast upwards, blocking the screen).

    Is there any way for me to make this lighting system work with the shadowcaster behavior, or am I trying too hard in the wrong direction? I already know that I could be using a black "light" layer and have sprites that punch holes through it, but I don't know how to do that on a large, dynamic scale. How would I make light bleed into a cave after breaking blocks, stuff like that.

    Any tips or links to resources would be greatly appreciated!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)